After updating to v0.123, I’m seeing an issue with my featured images that I’m pretty sure it has to do with this issue. In my blog posts, the thing is that some featured images are shown, while others don’t. But all of them are equivalent, in the sense that the featured image is in my main language (Spanish) only.
Interestingly, manually copying the featured image in my English post folder doesn’t work either (it worked with v.0.122 without even having to copy the image).
Sure, I’ll try to reproduce it with the same template I’m using, although as I said I’m only seeing the behavior in a few posts, making it hard to find a possible explanation.
In any case my site takes a while (some minutes) to build the first time but once a resources folder is generated it rebuilds in seconds.
It must be related to the function for getting featured image, as on direct link to featured.jpg file in english post: https://physichemically.com/blog/2023/07/31/women-in-science/featured.jpg the picture is there for english post even that the file originally in in Spanish post folder. Interesting.
Whats the specific function in your site to convert it to WebP?
1st file is the one that is missing, 2nd is the one that is displayed.
Are both files working when running site locally?
If your hugo is generating these files when hosting locally, maybe there is an issue when is generated in production?
I’m not at computer now but I can’t see the images locally either, so that file probably won’t be there. Just in case, the site built fine with v0.122.
You got this file in resources/_gen/images however you are not pushing this folder to GitHub hence when Cloudflare is generating page, it generating this files for you.
On my private website I am pushing it with my GitHub as this saving me lot of time on re-generating this files on Netlify, but still, cloudflare is doing this with keeping previous caches (which looks like is much faster than netlify). I think maybe a cache for this file is corrupted on cloudflare end.
If I can suggest, if you can temporarily replace file featured.jpg in post women-in-science with something different and publish site and see if different image will appear correctly. If it will, this looks like caching issue.
But how does that explain that I can’t see those images locally either? I’ve cleared my browser’s cache and even opened my website with a fresh browser and I still don’t see them (while I could see them when building with v0.122).
git clone --single-branch -b hugo-forum-topic-48501 https://github.com/jmooring/hugo-testing hugo-forum-topic-48501
cd hugo-forum-topic-48501
rm -rf resources public && hugo && tree public
And there’s the problem. On a multilingual, multihost site the original image from the default content language is copied to the other sites, but the processed resources are not.
Need to log a bug.
Please leave this in an unsolved state until the bug has been logged.