system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: In recent years, new formats like webp and jfif have started popping up. However, if I rename them to gif or jpeg, they still work. How can it be that renaming the extension doesn't ruin the image format? Why do they even exist then?

Obviously I'm just tired of constantly renaming downloaded files because I can't open them in discord or photoshop. It seems entirely unnecessary.
gpt
The file extension just tells the OS what program to use to open the file. The program that tries to open it is going to actually look at the file to see what it is.

In virtually all cases, any program that can open webp or jfif also knows how to open gif or jpeg, so when they open the file they just go "Oh, this is a jfif" and keep doing their thing.