Unable to render an image

I have made a new site using Hugo New as suggested in the tutorial. I have added a few pages, tags and categories. I am using the PaperMod theme and followed this tutorial.
I have a structure from the “new” site generation like this:

So now I want to add a simple image to one of the posts. When I look for image in the docs i am directed to this page. I actually have no idea what image processing is and have not found a good explanation. Curly bracket seems NOT to work in the MD.
So I have 2 questions:

  1. How do I add an image to the post. I assume the image should be stored in the resources/_gen/images/ folder, but that does NOT work. I see the dir “static” mentioned a lot, but it’s not part of the template. Should it be
  2. What is " The Image Resource"?

This is actually quite frustrating, that something so simple is so complicated?

You are looking at template examples.

Also you do not place anything manually under /resources/_gen/ as that is a directory that gets populated automatically by Hugo.

The easiest way to place images would be to organize your content in Page Bundles

The Image Resource is an image that Hugo can process as a Resource. Hugo can find resources that reside either under a Page Bundle or under the assetDir which is called /assets/ by default.

A Markdown content file accepts Markdown Syntax, here is an example.

Also here is a guide to Markdown Syntax that follows the CommonMark spec -that is used by Hugo’s Markdown processor-.

P.S. I amended the topic title. i understand the frustration, but there is no need to vent in this forum.

Thanks a lot for your answers and the links. I tend to use MD mostly for simple readme files and some wiki entries we do. I will check them out.
May I suggest:
The “hugo new my_web_site” should make both the /static, the /assets and the first dir for a post with an index.md file inside it? Maybe even with a test image.
Googeling this revealed that I was not alone not having a clear understanding of this and a first example would be highly helpfull for a lot of people.
Also It would be nice if you included the part about html templates in MD in the getting started. Most people probably just want to make a simple website (at first anyway) and that is about what they need to do that.

1 Like

For reference I opened the following issue:

1 Like

Hi @larsoleruben

Try these 2 sites really helped me in learning Hugo

  1. Mike Dane’s Hugo tutorials to start learning basics

  2. Go though Hugo Docs for advanced learning


1 Like