Hi, In Safari 15.4 we've noticed an error with the attribute loading="lazy". HTML img tag with this attribute are not loading consistently. If you check the network tab you will see that the images are not being requested at all. So far, the solution is to remove the attribute or use loading="eager". You can successfully replicate it with this codesanbox (https://codepen.io/intellix/pen/JjMwWae). Found it here (https://github.com/Fyrd/caniuse/issues/6243). Additionally if you go to "Develop > Experimental Features" and disable "Lazy image loading" the images with loading="lazy" will load consistently.
The html seems to work fine in a standalone file, but as soon as it is embedded in an iframe no image load is triggered.
<rdar://problem/92798878>
Created attachment 458903 [details] Patch
Comment on attachment 458903 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=458903&action=review > Source/WebCore/ChangeLog:8 > + Use document as root for lazy image observer. The iframe's document?
Can you test lazy image loading with Command-+ zoom too? I believe we might have some intersection observer bugs with zooming.
Created attachment 458952 [details] Patch
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Committed r293933 (250379@main): <https://commits.webkit.org/250379@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 458952 [details].