Images don't load when site is deployed

The relative URLs in blog’s post’s images don’t work whem site is deployed in github(or even when I load the page from the public folder) but hugo server works very well. The images are stored well but for some reason the url are broken.


links to page: Vantagens do uso de Energia Nuclear

I have no idea what’s the cause of the problem.

The server returns a 404 for that image.

Failed to load resource https://peteletricaufba.github.io/images/Ffs1MNW.png

How are you referencing the image in your content file?

Also your site has several CORS (Cross-Origin Resource Sharing) issues that prevent the loading of several of your site’s assets. You need to look into these errors on your own since we do not provide support for CORS issues in this forum.

Your content security policy is messed up. Change Content-Security-Policy in your headers to Content-Security-Policy-Report-Only and your browser console will spit out issues without your site breaking. Read them. Understand them. Google them. Fix them. When the reports cease then change back to Content-Security-Policy and you are good to go. Basically what I can read in the plethora of issues in your sites browser console:

  • You load content via HTTP, but CSP requires https.
  • You have services on remote sources that are not allowed to load.