-
Notifications
You must be signed in to change notification settings - Fork 14
Overriding naturalWidth / naturalHeight will break some existing tools #10
Comments
I believe Cloudinary’s tool, at least, downloads images and checks their actual pixel dimensions using tools outside of the browser. Can't speak for the others, but it seems like tools like this could use one or more additional properties on
I know I have often wanted these properties, when informally testing things. Dunno if those would fall in scope, here, or not. |
I was a little bit worried about having "intrinsicSize" modify naturalWidth / naturalHeight so I asked around if there was active usage of knowing the image's actual width and height. From the response I got, it didn't seem like there was any usage of naturalWidth / naturalHeight. I am interested in learning about in which cases people would want to get the image's actual width and height from JS, though. image width and height should be easily exposed via a new attribute, as long as there's solid evidence proving that we should support it on the web. |
Did a quick search though the HTTPArchive and it appears naturalWidth / naturalHeight are referenced in a few places - will try to look in a bit more depth at where it's actually used and what it's used for next week.
Query
|
@andydavies any progress on this? |
I personally use So maybe there are already some edge cases that would make natural* not reliable either, but IME using a simple So I would prefer to see new IDL atttributes |
OK, so on my end of the internets, a few use-cases emerge for exposing
|
@yoavweiss @loonybear Came across another use case at a client yesterday They're a retailer, and as typical with many retailers have a zoom on hover behaviour for product images - the same image is being used for the zoomed and non-zoomed image. Will dig into it more and share what I find |
A number of tools [1][2][3] rely on naturalHeight and naturalWidth to determine whether appropriately sized images are being served to the browser.
If naturalHeight and naturalWidth are updated to reflect the dimensions specified in intrinsicSize then the ability to get the original image dimensions will be lost and features of these tools will break.
The text was updated successfully, but these errors were encountered: