this post was submitted on 25 Mar 2026
288 points (98.0% liked)
simpsonsshitposting
5180 readers
111 users here now
I just think they're neat!
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Simply changing the extension wouldn't work because each image type has a specific header - even changing a .png to .jpg wouldn't work - and organizes the actual image data in different ways.
The header is what actually identifies the file type. For webp, it's called the RIFF header and it must be 21 bytes (it's a standardized specification, btw). For jpeg, the header is only 2 bytes and has the values
FF D8. In theory, this means that you could even rename the file toimage.zipand, if you opened it in an appropriate program, it would read the header and still render it properly