You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'd be useful for building <picture> elements to have each image's mime type along with its other data, for use in the type attribute of the <source> element.
The text was updated successfully, but these errors were encountered:
Images' filenames do not always have a type extension
Something that looks like a filetype extension may not really be its filetype. You might get this for example if automatically compressing lossless originals to a suitable compressed format.
Not all common filetype extensions map exactly to mime types as your code would rely on them to. .jpg is the most common one for image/jpeg (and then there are also .jfif, .pjpeg, .pjp), and .svg for application/svg+xml for example.
Images' filenames do not always have a type extension
Something that looks like a filetype extension may not really be its filetype. You might get this for example if automatically compressing lossless originals to a suitable compressed format.
Not all common filetype extensions map exactly to mime types as your code would rely on them to. .jpg is the most common one for image/jpeg (and then there are also .jfif, .pjpeg, .pjp), and .svg for application/svg+xml for example.
You are correct with the said issues. Sorry I did not notive them as I personally only use webp and avif. This probably has to be fixed by the loader.
It'd be useful for building
<picture>
elements to have each image's mime type along with its other data, for use in thetype
attribute of the<source>
element.The text was updated successfully, but these errors were encountered: