Cannot access files in static directory

Hello,

I’m moving from Jekyll to Hugo and have issue with serving/accessing static files. I have image files in directory structure like this: /static/uploads/post-X/img-X.png. e.g. /static/uploads/post-1/img-1.png

But when I am adding it to my markdown blog post there is no image (real code example).

![img1][img1]
[img1]: /static/uploads/post-52/img1.png

Also, when I am trying to access the file directly by entering localhost:1313/static/uploads/post-52/img1.png I am also unable to do that. I also cannot access style.css file placed in /static/css.style.css

Thank you in advance!

Remove /static part from the link when accessing it. Things in the static/ directory get copied to the public/ dir i.e. your site root.

1 Like

Thanks, it works!