Okay, here's the thing, a Markdown file is just plain text — ordinary non-formatted text. Unlike a sophisticated (and often not cross-platform or non-portable) word processing app, you can't simply copy and paste a photo inside a Markdown file.
Here's how we do insert a photo though in Markdown.
- Find a photo on the web OR save a photo somewhere on the web
- Copy the URL of the photo
- In many cases you can right-click on an image from your web browser and select an option to copy the image location or view image and then copy the URL.
- Sometimes you can obtain the image's URL by using your browser or OS share feature. Often a photo sharing service will offer the URL within its sharing menu too.
- Somewhat similar to the way we insert a link inside a Markdown file we start by inserting the Photo's URL inside our Markdown file.
- Put parenthesis around the URL:
- Put an exclamation mark and pair of square brackets in front of that:
- Inside the square brackets, put a description of your photo (ALT attribute in HTML-speak ):
![This is a pretty photo](...jpg)
That's it. When you share the raw Markdown file, the image won't appear, but your reader will have a link to it that they can open in a browser.
Why go through all this mumbo jumbo though? A word processing app allows us to create images right inside a document and offers templates so we can get the look we want.
Well, please stick with me for the last blog of this Write Once, Post Anywhere series to see the raw power that Markdown provides.
We have one more short blog for some less often used Markdown features (not required to know, but still good stuff). Then I'll wrap it up with The Power of Markdown which should hopefully give you a reason for using Markdown.