HarryJamesPotter27
HarryJamesPotter27

Reputation: 181

GIF format as png?

I'm seeing some images online that end in .png but appear as GIF. How is this possible? Example: https://www.khanacademy.org/computer-programming/loading/6267221601681408/5689792285114368.png

Upvotes: 0

Views: 251

Answers (1)

leonbloy
leonbloy

Reputation: 76026

This is a GIF file, with an .png extension. Though the extension is "wrong", many image viewers (including browsers) can still it interpret them correctly because they don't believe blindly what the extension says (remember that the "extension" is just a hint), but they look into the image content. The first bytes of most common image formats allow to easily identify the image type. In this case, you can check (looking at the image content, say, in some hexadecimal editor/viewer) that the file content starts with the ASCII characters "GIF89a".

Upvotes: 1

Related Questions