There are similar questions like this, this, this, and this, but they don't address the problem.
We have a locally stored image that is rendered in the development environment.
In production, however, the image doesn't render. Accessing the image URL from the browser gets redirected to the 404 page because the image isn't found for some reason. Other images in the same directory are rendered without issue.
Details :-
Image 1 URL: https://test.com/designs/thumbnails/foo/bar1.jpg
Image 2 URL: https://test.com/designs/thumbnails/foo/bar2.jpg
Entering both image URLs directly into the browser yields different results. Image 1 will render, but image 2 won't. Image 2 redirects to the 404 page.
This isn't a caching issue, rendering in incognito fails.
Both images exist in the directory.
This seems to occur for new images, though the pattern isn't clear (i.e., some new images render but not all do).
Image rendering code:
<img class="thumbnail" src="<%= design["thumbnailURL"] %>">
wheredesign["thumbnailURL"]
is an relative URL to the image (which, yes, does exist).We use
Rails 3.2
and Cloudflare.