Open WhoseTheNerd opened 1 year ago
I managed to do this by adding el.src.startsWith("data:image/jpegxl;base64,")
to the MutationObserver
if list and all jxlSrc
used in caching context gets encodeURIComponent(jxlSrc)
Resulting jxl.js looks like this
Thanks, but what's the real world use case for this?
It allows me not to deal with image files, since they are all embedded into single file, i.e. all images, js, css and etc. You can think of it as something similar to SingleFile.
The MIME type image/jpegxl
is still not standardized by IANA. There is a feature request for another MIME type image/jxl
, so we cannot reliably use this one or another to detect JPEG XL images. It' the best to wait until it gets standardized.
How to do this with blob image data?
The MIME type
image/jpegxl
is still not standardized by IANA. There is a feature request for another MIME typeimage/jxl
, so we cannot reliably use this one or another to detect JPEG XL images. It' the best to wait until it gets standardized.
It would be fine to check for either MIME type as there are no conflicts with other types.
Decoding support for base64 embedded jpeg xl images would be nice. Any plans for that?