Hello....Images and contents in static

Hello there,

I’m new to Hugo (and to web designing in general). I’ve just created my website based on the Hyde-y template but I’m not able to insert images and other contents.

I’ve inserted the following in the /content/main.md file:

<img src="/img/profile.jpg" width="300" />

where /img/profile.jpg is located in the static folder. What is wrong with this approach?

Thank you in advance for your help!

The image should be in {Hugo directory}/static/img or in {Hugo directory}/themes/{theme directory}/static/img

Your code should look like

<img src="{{ .Site.BaseURL }}/img/profile.jpg" />

It should be works on localhost. But, if you wish to publish your site to the Internet, please re-check Your baseURL front-matter on config.toml is filled by a correct domain name.