Published Aug 6, 2021Updated May 4, 2022
Contribute to Docs
Embedding an image is very similar to adding a link in Markdown:
![Alt text](URL or file path)
- Add an exclamation mark
- Followed by the alt text in square brackets
- And the path or URL to the image asset in parentheses
![Sonny and Mariel high fiving.](https://content.codecademy.com/courses/learn-cpp/community-challenge/highfive.gif)
The output would be:
An optional title can also be added after the URL, still in the parentheses:
![Sonny and Mariel high fiving.](https://content.codecademy.com/courses/learn-cpp/community-challenge/highfive.gif 'High Five')
To add a link to an image, enclose the Markdown for the image in brackets, and then add the link in parentheses.
[![A mushroom-head robot](/assets/images/codey.jpg 'Codey the Codecademy mascot')](https://codecademy.com)
Looking to contribute?
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn Markdown on Codecademy
Front-End EngineerFront-end engineers work closely with designers to make websites beautiful, functional, and fast.
Includes 34 Courses
With Professional Certification