How to import an image in a Markdown page


(Michel R Levesque) #1

I created a markdown page to experiment with that type of page.
The cheat page says to add an image :
! Alt text

I tried :
! [Nice image] (/Users/UserName/FolderName/Image.jpg)
I dragged and dropped the image file and the path was automatically added in the edit mode

I get the text Nice Image in preview but no image, only the path.

I tried variations with or without spaces, with or without parenthesis and I always get the same results.

Can you help me ?


(Michel R Levesque) #2

The cheat page says:
! Open bracket, Nice image, Close bracket, Open parenthesis, Path of file, Close parenthesis


(Robert Ziebol πŸ––πŸΌ) #3

You need to host the image somewhere, like on your server, then the markdown code would be this:

![This is my image](http://www.mysite.com/assets/image-1.jpg)

Here is a real world example:
![This is my Star Wars Last Jedi Image](http://www.zeebedesigns.com/assets/image-1)

If I put the actual code in here, it will give you a poster image from Star Wars the Last Jedi, which will look like this:

Since the Forums use Markdown, it will show the image. Here is a little more explanation of the code.

The brackets [] are for the Alt Text of the image, anything you type in there will be the alt text of the image.

The parenthesis () contains the URL to the image. Markdown does not allow for drag and dropping of images, if you are going to use it, you need to host the image somewhere, preferably the server where your site is. Make a folder, call it assets, images, warehouse whatever you like and put the image there. Then get the URL to that image.

I am not exactly sure what the exclamation point does ! but someone on the forums might. (found out the ! differentiates that it is an image and not a link)

Hope this helps a little.


(Doug Bennett) #4

In addition to what Robert @zeebe posted if you prefer learning from video Wes Bos has a very good and short(34min) free course. I think you might have to give an email address, but he doesn’t spam you.

He has a chapter on links:


(Michel R Levesque) #5

Very interesting. I learned much with these videos.

Thanks


(Michel R Levesque) #6

Thanks zeebe. It worked.


(system) #7

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.