Why can't I access the image files on my website?

For Workers & Pages, what is the name of the domain?

backpackbrawlmvp.com

What is the issue or error you’re encountering

I’m unable to access the images on my website. Whether in tags or by directly entering the URL. They do not appear.

What steps have you taken to resolve the issue?

I tried purging the cache on Cloudflare and also tried clearing my cache locally. They were showing up fine on a previous deployment.

What are the steps to reproduce the issue?

Go to the site - you’ll see no images load.

Are you sure your image files are where your homepage says they are?

While most of them have spaces in the name, that does not appear to be the issue, since the Spark.png image is also not found.

Yes I’m sure. I also uploaded a new build with an image in the root folder, still can’t see it. https://77be25e6.backpackbuilder.pages.dev/apple.png

I thought the spaces would be an issue too, but they worked just fine on my previous builds.

I thought also perhaps that adding externally loaded javascript was causing problems - but removing that doesn’t help.

The only other major change is that I recently added a domain name. I looked that up and the only relevant problem I found was that the domain must be proxied - which it is. So, still not sure.

Another note: I’m able to access other files in the root directory, including .txt and .html files.

Alright, I got some new developments.

I can load static images just fine. For example, shows up.

I cannot dynamically load images. Javascript adding an img element to the page fails to load the image.

I tried changing the paths from “images/shared/Apple.png” to “https://backpackbrawlmvp.com/images/shared/Apple.png” - no luck.

Sorry, don’t know how to edit. “<img src="Apple.png">” shows up.

Your Javascript is throwing an error, which will stop execution. I don’t think your dynamic image loading was ever executing at all because of this. The error is about screen.orientation.lock, which is a real thing but is not widely supported. You should check if it’s present before calling it.

See the Caniuse page for browser support.

1 Like