Inserting image into post by putting it under static folder isn't working

I read this for an attempt to put images in hugo blog. But image is not coming in my localhost:1313.
image
I am getting somethng like this and console says 404 not found

http://localhost:1313/static/abc.png

It shows 404. How do I resolve this?

Fixed by putting them into content/images/myimage.png directory.

Everything inside the static directory are copied as is to the public directory when Hugo build your site.

These files:

static/image.jpeg
static/images/logo.png
static/favicon.ico
static/doc/example.pdf

Will be accessible at these urls:

http://localhost:1313/image.jpeg
http://localhost:1313/images/logo.png
http://localhost:1313/favicon.ico
http://localhost:1313/doc/example.pdf

1 Like

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