Path to page folder in <img> tag?

I would like to resize a picture. According to

“As of this writing, Markdown has no syntax for specifying the dimensions of an image; if this is important to you, you can simply use regular HTML <img> tags.”

But I can not figure out how to use the relative path to the page folder for the images stored there.

When I use markdown the path to the page folder is set but how can I get this with an img tag?

I found out this:
<img src="./myPagesName/myImageName.JPG" width="40%">

But here I still have to put the page name which I would like to avoid.

Thanks for any hint !

Hi fabianus,

if you do not see anything in frontend, the path or filename - even the extension - will be wrong. That’s true.

Beware of issues relaying on case sensitiveness. JPG might be expexted and jpg is given for example. If the writing is correct and you see that good old [x] as a placeholder for your image in frontend, you should do a right click there and select the option to show more information about the image. Then you should see the whole path to the image rendered in markup and can compare it to the real path where your image is stored. At that point you have all information to alter the path in your image tag.

If you don’t see a placeholder in frontend, alter your image tag to this:
<img src="./myPagesName/myImageName.JPG" alt="myImage" title="myImage" width="40%">
This creates a placeholder and clickable area to get more information via rightclick as written above.



Grav added syntax to resize images in Markdown. You can read how to do it in the documentation.