01:09
<Max>
Max: https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-naturalwidth maybe
I think you'll find those properties are the dimensions after browser intervention, and do not necessarily reflect the dimensions of the image in the file on the server.
01:11
<Max>
Checkout this PR: https://pr5734.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/HTMLImageElement/naturalWidth
01:11
<Max>
"Note: Most of the the time the natural width is the actual width of the image sent by the server. Nevertheless, browsers can modify an image before pushing it to the renderer. For example, Chrome degrades the resolution of images on low-end devices. In such cases, naturalWidth will consider the width of the image modified by such browser interventions as the natural width, and returns this value."
01:12
<Max>
It would be very useful, I think, so have an API that returned the width of the image in the file that is downloaded, prior to browser interventions.
06:02
<jgraham>
devsnek: <img src=foo.svg> doesn't execute js
06:49
<annevk>
sideshowbarker: if you have a moment: https://github.com/whatwg/html/pull/6747
06:53
<sideshowbarker>
merged
06:55
<sideshowbarker>
annevk: about https://github.com/mdn/content/pull/5715#discussion_r646077455 nevermind — I realize now that I was just misreading the spec and testing the wrong thing (well, just (re)testing the OP’s test case, which was wrong)
06:57
<annevk>
sideshowbarker: yeah, depends on namespace prefix, not namespace
06:58
<sideshowbarker>
yup, Ms2ger set me straight on that
14:18
<EveryOS>
I've now seen Devsnek on a total of 3 chat platforms. They are like everywhere.