It's common for these interactive sites to store their images directly in their javascript code. E.g.:
Code: Select all
"image":"data:image/avif;base64,blahBlahBlahBlahBlah",
I'm thus unable to view these sites in Pale Moon, as none of the AVIF images load. However, since I intend to save these sites and view them offline anyway, I'm very much open to working around this issue by converting these images back into a supported format.
I figure I can throw together something, maybe a tiny python script, to parse these embedded AVIF images and convert them. The Base64 decode and eventual re-encode should be simple enough. But how to perform the actual format conversion is where I'm a bit lost and would appreciate recommendations. I'm guessing I should convert them into JPEG-XL format, since I'd have no way to know if the images were originally JPG or PNG. (And to give AVIF the metaphorical middle finger.)
But what can I use to convert the AVIF string into a JPEG-XL string? (Also, to make things harder, whatever I use / do would need to work on win7.)