Image is not shown or broken on webpage

Option -t is just to specify one theme. You can use it even with option --server.

When you serve hugo, with or without option other than --server, all datas are correctly rewrite into public folder, as exemple:

public/
   css/
       file.css
   images/
       img-x.ext
       img-y.ext
   js/
       file.js
   posts/
       article1/
           index.html
       article-n/
           index.html
           img.ext
(...)

all you have to do is to publish this root on your webhosting!


But, as long time you use Hugo as server, the:
=> folders css, js and images (the name can be too: img) are into folder static.
=> folder posts is into folder contentHugo considers this folder as the root of your site on localhost.
etc.


I can’t think/see of a better way to help you! :wink:
Maybe I’m wrong :stuck_out_tongue:

1 Like