Hugo Static Site missing images once deployed to Cloudflare Pages

Hi everyone, Thank you for looking at this issue. I made a simple Hugo website locally, git pushed to GitHub, and deployed to Cloudflare Pages (https://williamsrestore.com/). I removed the base_url in hugo.toml and used the build commands of "hugo -b $CF_PAGES_URL" in Cloudflare pages. I attached an image showing that Cloudflare Pages uploaded the images (work1-4.jpg) but when I visit https://williamsrestore.com, the images are broken/not loading at the bottom of the website. Any advice on how to fix this? Thanks in advance.
N
Nob12d ago
can you send the build logs ?
S
SendMost12d ago
The assets appear to be uploaded during build but I think they're incorrectly being referenced and thus breaking.
C
Chaika12d ago
Pages is case sensitive. You're referencing them in your html as .jpg lowercase, but they're uppercase https://williamsrestore.com/images/work2.JPG vs https://williamsrestore.com/images/work2.jpg It'll work on Windows because Windows is case-insensitive, but in other more sane systems it won't
C
Chaika12d ago
I would just lowercase the extensions/keep all filenames lowercase
S
SendMost12d ago
Yooo! Thank you. Good eye. I will test it.
N
Nob12d ago
whats this image x)
S
SendMost12d ago
It's equipment for water damage restoration.
S
SendMost12d ago
I only have .jpg on my local environment but it is showing as uploading both upper and lower case... do I need to redeploy on cloudflare pages to remove the uppercase? i am still pointing to lower case but the images are still broken/not loading.
No description
C
Chaika12d ago
you don't really need both but that'll work. The only thing you're hitting now is cache
No description
S
SendMost12d ago
yes, i didn't intend to upload both. the github only has lowercase so it is the old cache as you say thank you!
C
Chaika12d ago
You could go to Caching -> Configuration -> Purge everything, or Caching -> Cache Rules to stop your website from caching Pages. Pages has its own internal cache, it's just that your Custom Domain will also cache images and certain extensions If you make a cache rule like this, you can stop that: (don't mind my text edit over someone I helped create this before, easier to reuse lol, same idea)
No description
S
SendMost12d ago
i absolutely love cloudflare. thank you for this information this cache rule is great and i now see the images. you're the best @Chaika thanks for your help too @Nob
Want results from more Discord servers?
Add your server
More Posts
GCS ACLsGoogle Cloud Storage migration does not seem to work when using Buckets with Fine-grained access conAI multiple binary filesHi! I'm tried out the AI image generator, and it retrurns the image as a binary data. How can I sendpelican build integration is failingpelican build integration is failing because the pelican executable is either not installed or not oElevated number of 524Hey guys, we are seeing a lot of 524 responses, while the origin looks completely healthy. Any cluesonly "t" on response - AI Rest APIhey! I'm currently getting the following response on the second message to the AI: REST API responseEmail obfuscated when using HTMLRewriterHi, I'm using HTMLRewriter to parse some html data, when deployed I see parsed text has email obfusc"No deployment available" when deploying from Github ActionsMy setup is pretty straightforward. I have a Remix app with a simple build step (`remix vite:build`)Pages deployments failing (wrangler deploy)I'm attempting to deploy to an existing Remix (vite with cf) to Pages. Everything has been smooth unworkers-rs repo RA feature detectionDoes anyone else have the problem that rust-analyzer doesn't properly detect the enabled features inDynamically import incompatible packages for dev onlyI am currently dynamically importing a package that is incompatible in workers just during developmeDeploy by pushHello is it possible to deploy changes with git push like it's on vercel for my worker? or i have maAre the api docs for updating worker settings wrong?Specifically looking at this request: https://developers.cloudflare.com/api/operations/worker-scriptHow to access worker queue producer bindings in local development?At boot I see this message: ``` wrangler.toml changed... Using vars defined in .dev.vars Your workeNeed some help on collecting coverage in workers.I know that the coverage via V8 is not possible, but via istanbul it does not collect coverage as weHey there! I'm having some trouble with an SSL free certificate on my website. CloudFlare is active.So I've been trying for days now but I can't get the certification of the SSL.Identity theft reportHow can I contact Cloudflare support to remove from their platform a page that is impersonating a paZero Trust - How to filter Web Socket trafficHi, I'm using an app (iray server) that uses the same port (9090) for the web UI dashboard and WebSoCan you forward certain requests from a Cloudflare Pages site to a different domain?Hello! I'm looking to see if I could deploy a site using PayloadCMS with Cloudflare Pages. They haveHi! I want to pwd-protect my Page. How to do it with Functions?I have a static page set up, live, working. I want to add password protection to the page. I found aSet different domain for public domain and fucntions APII have a site on cloudflare pages using pages functions. the functions also acts like an rest Api va