How to add new images into a page

Hi! I’m new to Hugo and I’m just trying to add a new image into a page I created. First, I added the image in the static/img folder. If I add a subfolder (e.g. static/img/deveopers) and I move the image there, my site automatically breakes with the follwoing error:
file does not exist. Hugo Static Site Generator v0.59.1-D5DAB232 windows/amd64 BuildDate: 2019-10-31T15:22:43Z Reload Page

So I just leave the image at the static/img folder and try to reference it from my page:

![demo](/img/search_extension_point.jpg)
Hi! I’m new to Hugo and I’m just trying to add a new image into a page I created. First, I added the image in the static/img folder. If I add a subfolder (e.g. static/img/deveopers) and I move the image there, my site automatically breakes with the follwoing error:
file does not exist. Hugo Static Site Generator v0.59.1-D5DAB232 windows/amd64 BuildDate: 2019-10-31T15:22:43Z Reload Page

So I just leave the image at the static/img folder and try to reference it from my page:


<img src="img/search_extension_point.jpg" alt="demo" class="img-responsive">

And, in both cases, there is no image being displayed.
Any idea what can be causing that? Should I register the images first?

Thanks in advance,

And, in both cases, there is no image being displayed.
Any idea what can be causing that? Should I register the images first?

Thanks in advance,

Apart from a lot of garbled text in your question (use the code button in the editor to format error messages): Here are some samples:

static content:

  • /static/image1.jpg
  • /static/foodimages/image2.jpg

embedding via markdown:

![demo](/image1.jpg)
![demo](/foodimages/image2jpg)

embedding via image tag:

<img src="/image1.jpg" alt="demo" class="img-responsive">
<img src="/foodimages/image2.jpg" alt="demo" class="img-responsive">

Note the / in the beginning.

2 Likes