Get link for an image in page bundle?

Using this tutorial, how do I get the URL of an image in the bundle? ./content/blog/... . Second, what should the index.md contain?

│   _index.md
│
├───blog
│   │   _index.md
│   │
│   ├───sample
│   │   │  
│   │   └───look-at-me-now
│   │           -f
│   │           look.jpg
│   │           look-at-me-now.md
│   │           at.jpg
│   │          me.jpg
│   │          now.jpg
│   │           excess.jpg
│   │           imprests.jpg
│   │           index.md

Images belong in the static folder if that helps

No they don’t.

Organizing a Hugo project is more flexible these days.

1 Like

There have been many posts in this forum that answer your question about rendering images residing under Page Bundles.

Please use the forum search. Hint: use Matkdown Render Hook srcset and similar.

The index.md would most likely need the necessary front matter for example a title parameter or a date.

Also if you are going to render the images via Markdown Render Hooks you would need to enter the markdown syntax that references each image.

[quote=“alexandros, post:4, topic:37419”]
Please use the forum search. Hint: use Matkdown Render Hook srcset and similar.
[/quote]

Knowing the right terminology is the problem. Anyways, I don’t have a lot of use cases for page bundles (less than 10 articles anyway requiring them out of 400+). So your suggestion is difficult for me to follow or implement. I will stick with the static folder. Cheers!

Actually, the render hook in the tutorial works when the image is called in markdown like this ![Alt should always be set for reasons of inclusion](my-image.jpg "An optional title/caption supporting *markdown*").

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