[Webkit-unassigned] [Bug 224197] Safari not computing image aspect ratios from width and height attributes
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Apr 15 06:21:55 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=224197
--- Comment #5 from cathiechen <cathiechen at igalia.com> ---
(In reply to Owen Sullivan from comment #4)
> Interestingly, I still experienced the issue after including an alt for each
> image. Could be a cache issue on my end, as I had previously been testing on
> a production website before I whipped up that CodePen, but figured I ought
> to add that information.
Yeah, I analyzed the page a bit.
After this page is loaded, <img>s don't have src attribute(use data-src instead). For instance,
`<img class="lazyload img-fluid" data-src="https://placehold.jp/1000x2000.png" width="1000" height="2000">`
So the browser think this <img> is an error image, and doesn't apply the feature (mapping width height attributes to aspect-ratio)
After clicking "Nav 4", <img> will get the src attribute.
`<img class="img-fluid ls-is-cached lazyloaded" data-src="https://placehold.jp/1000x2000.png" width="1000" height="2000" src="https://placehold.jp/1000x2000.png">`
So <img> is not an error image now.
And I don't think <img> should have alt in this case, because an error image with alt won't apply the feature.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210415/3bbb033e/attachment.htm>
More information about the webkit-unassigned
mailing list