2 ms·
the spec says "[…] the image dimensions can be decoded from the first 2KB of the image". It doesn't say anything about when the dimensions are known and I woul
by pilif 8y ago
the spec says "[…] the image dimensions can be decoded from the first 2KB of the image".
It doesn't say anything about when the dimensions are known and I would assume it's using those in that case.
However, loading 2KB of an image is enough for most image formats to determine the dimensions even if they aren't specified in the hosting document (because most image formats contain a header specifying dimensions).