Hi @rjmark,
I’ve made a bit more progress on this. It is not the ResizeObserver changes like I originally thought but rather Apples implementation of the loading="lazy"
attribute for images and iframes.
Essentially the plugin is loading all the images and setting their src
attributes, however if you check in the Developer Tools > Network tab you’ll see the browser is not actually performing the request. If I remove the loading="lazy"
attribute from any of the blank <img/>
elements it suddenly pops into view. You can also test this by going to your iOS Settings > Safari > Experimental WebKit Features and scrolling down in the list until you see Lazy image loading is enabled by default in 15.4. If you temporarily disable this and refresh your page, everything loads correctly.
Now obviously this is not a solution, but here in lies the tricky part. We’re not outputting this attribute in our gallery markup. If you view page source you can see the markup as it is received from the server and checking the <img/>
elements within the gallery, you’ll see none have the loading="lazy"
attribute. This was done as it was not fully supported and we have a JS implementation providing the lazy loading logic.
So currently I’m trying to find the bit of JavaScript in your page that is going along and adding this attribute to all the images. This is also probably why it is inconsistent with the hard refresh. Clearing the cache forces the script adding the attribute to be downloaded again and the time it takes to do this is all that is needed to correctly trigger the requests for the images. Without clearing the cache the script is in memory and so is being executed without the small delay of the download.
TDLR;
The issue is being caused by a 3rd party script adding loading="lazy"
to all <img/>
elements in the page in conjunction with the Image lazy loading feature of Safari being shipped enabled in 15.4.
I’ll continue looking for the script and update once I’ve found it but it is currently 1AM here so it may only be tomorrow.
Thanks
Steve