Failing deploy of a single image file

Hi all, hope you are well these days…

I am having an issue with files (one specific file) not being deployed when running netlify deploy.

The setup:

I have a website based on GoHugo.

You can find the repository here. Run npm run install to set it up.

When I deploy the website it ALWAYS fails to upload one single file, a background image used on the site. I don’t know if it fails to upload the file or if something sinister is going on in regards to caching or headers. The file in question is static/assets/images/bg.jpg.

Running the server locally via npm run server or hugo server shows the image at for instance https://localhost:1313/assets/images/bg.jpg. But then deploying via npm run deploy (which is a wrapper for some cleaning up, then running hugo, then netlify deploy --prod shows an error page (for instance at https://kollitsch.dev/assets/images/bg.jpg).

The file is in the public folder that is being deployed to netlify. It’s also the only file that is “missing”.

I renamed the file - it still does not appear.

My guess is that something in _headers or _redirects is messing up the image? Removing _headers from the deploy does not result in the image showing up.

I am out of ideas and relatively sure that it’s probably something simple. Not seeing the forest with all those trees standing there :wink:

Any advise?

The netlify site ID, if that is of importance, is 02e05c7a-11a0-48e0-988f-7fc12267eb89

The image seems to work on the deploy permalink: bg.jpg (2000×1333) (66bcc1d1a9b1dbcb69f8c964–kollitsch-dev.netlify.app). The issue is coming from Cloudflare. The request was served by Netlify on August 10:

image

Cloudflare continues to serve the stale response causing this.

1 Like

Yes, you are right :slight_smile: Cloudflare caching was the issue. I am unsure why this became an issue, even with the renaming. I guess it was some form of too early clicks on the new name. After some cleanups it’s working now. Thank you @hrishikesh!