We are investigating what seems to be a Firefox bug relating to avatars being cached on disk and then retrieved by a later request.
Reported to Firefox as:
The way this problem manifests is missing avatars where one would normally be present, e.g.:
These are respectively:
<img loading="lazy" alt="" width="24" height="24" src="https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/mancera1979/48/732001_2.png" class="avatar" title="mancera1979 - Frequent Poster">
<img loading="lazy" alt="" width="24" height="24" src="https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jca34f/48/340148_2.png" class="avatar" title="JCA34F - Frequent Poster">
and those URLs redirect to, respectively:
https://europe1.discourse-cdn.com/arduino/optimized/4X/3/3/7/337a5e4169461364c9805cfad882c9eb0332bdf3_2_48x48.png
https://europe1.discourse-cdn.com/arduino/optimized/4X/4/b/8/4b8c803f304aa7e7c487184224ec9f970c96e8c4_2_48x48.jpeg
While inspecting the DOM using the devtools, Firefox reports “Could not load the image”
It’s never on initial requests that this fails - it’s always only happened on subsequent requests that would load the image from cache:
Reloading the page sometimes triggers Firefox to load the image properly, e.g.:
after a reload:
We know that:
… the problem is not specific to the Discourse application itself. We have reproduced the problem with a static HTML page containing only links to avatars:
… disabling http3 in Firefox does not resolve the problem
… flushing the browser cache causes the images to properly load the next time
… end users have reported this problem on desktop and mobile
We suspect that:
… this has something to do with the image being loaded after a redirect
Certain of our hosting environments have a “redirect chaser” installed that causes a request to the the original URL to return the image itself instead of a redirect to the image. I do not believe anyone has experienced this problem in those environments.
We do not have:
a start-to-finish consistent & clear reproduction of the problem