GIF MIME Type
image/gif files contain, how GIF animation works, which applications open them, and how Poly supports them. MIME type details for image/gif
In active use| MIME type | image/gif |
|---|---|
| Extensions | .gif |
| Magic number | 47 49 46 38 37 61 or 47 49 46 38 39 61 |
| First standardized | 1987 |
| Created by | CompuServe Incorporated |
| Browser support | Chrome, Edge, Firefox, Opera, Safari |
| Example applications | Adobe Photoshop, Google Chrome |
| Poly support | Yes. Poly recognizes and decodes GIF files, records their dimensions, and generates static thumbnails. |
| Indexed by Poly | Partial. GIFs are searchable by filename and visual similarity from a decoded still frame; animation frames and embedded comments are not indexed. |
| Preview in Poly | Yes. Poly opens the original GIF in its image viewer, where supported browsers play its animation. Generated thumbnails are static. |
| Poly agent | Partial. The Poly agent receives a static WebP thumbnail and can reason about that rendered frame, but it does not inspect the full animation timeline. |
What does image/gif mean?
The image/gif media type identifies a Graphics Interchange Format image.1 A GIF can be a single still image or a sequence of images displayed with frame delays. The format compresses its pixel data losslessly with LZW, but each image block uses an indexed palette of no more than 256 colors. That palette limit is why photographs and smooth gradients often show banding or dithering after conversion to GIF.23
GIF89a can designate one palette entry as transparent. That gives a pixel only two states, fully transparent or fully visible. It does not provide the graduated alpha transparency available in PNG, WebP, or AVIF.2
image/gif and usually end in .gif.GIF87a, GIF89a, and the file signature
CompuServe introduced GIF in 1987 as a hardware-independent way to exchange compressed raster graphics online. The original version is identified as GIF87a. GIF89a followed in July 1989 and extended the earlier format with control and extension blocks for features such as frame timing, transparent color, comments, and application-specific data.2
The first six bytes identify the minimum GIF version needed by the stream:
| Header text | Hexadecimal bytes | Meaning |
|---|---|---|
GIF87a | 47 49 46 38 37 61 | Uses the 1987 feature set |
GIF89a | 47 49 46 38 39 61 | Uses one or more features defined by the 1989 revision |
The version is not a quality level. A conforming encoder is supposed to write the earliest version that covers the blocks it uses. Renaming a file does not change that header or convert its contents.2
How GIF animation works
A GIF data stream is a sequence of blocks. Image descriptors locate rectangular image blocks on a logical canvas, and each image may use the global color table or its own local table. A Graphic Control Extension can state how long to wait after rendering a frame, which palette index is transparent, and how the next frame should be composed over the canvas. The delay is stored in hundredths of a second.2
This design is compact for small animations in which only part of the canvas changes. It also creates interoperability traps. A frame might depend on pixels left by earlier frames, and applications can differ in how they treat zero or extremely short delays. GIF has no audio track, timeline controls, HDR, wide-gamut color, or partial transparency.
GIF compression itself is lossless: decoding produces the palette indexes that were encoded. Converting a full-color source to that limited palette is a separate, usually lossy step. A GIF exported from a photograph can therefore lose color detail even though the file's LZW stage is lossless.
How to open an image/gif file
Chrome, Edge, Firefox, Opera, and Safari display GIF files directly, including animation.3 Adobe Photoshop can save documents with one or more frames as an animated GIF.4 Most desktop image viewers and messaging applications also recognize the format.
If a file does not open:
- Check that its first six bytes are
GIF87aorGIF89arather than trusting the extension. - Download it before testing if a website has served an error page or another format with a
.gifname. - Try a current browser to distinguish a damaged file from an application that only supports still frames.
.gif extension is not proof that a file is safe or even a GIF. Treat unexpected downloads as untrusted, keep decoders current, and do not bypass operating-system warnings merely because the filename looks like an image.Support in Poly
Poly recognizes image/gif and infers it from a .gif filename. Its image pipeline decodes GIF pixels, records image dimensions, generates thumbnails, and creates a visual-similarity embedding from a generated thumbnail. GIFs are searchable by filename and by the appearance of that rendered still.5
The original file opens in Poly's image viewer, so a browser that supports GIF animation can play it. Derived assets have a narrower view of the file:
- Thumbnails are static images rather than animated GIFs.
- Visual indexing represents one decoded frame, not motion or every frame in the sequence.
- Plain images are not OCR'd, so words drawn into a GIF are not searchable as text.
- GIF Comment Extensions and application-specific blocks are not extracted into searchable metadata.
- The Poly agent receives a static WebP preview. It can describe that frame, but it cannot reason about the complete animation or its timing.
Should you convert a GIF?
Choose the destination according to what the GIF is doing:
| Need | Better fit | Why |
|---|---|---|
| Lossless still image | PNG | More efficient indexed storage in many cases, broader color support, and full alpha transparency |
| Short silent animation | Animated WebP, APNG, or AVIF | Modern color and transparency features, often with better compression |
| Longer clip or photographic motion | MP4 or WebM video | Video codecs are designed for temporal compression and can provide playback controls |
| Maximum legacy compatibility | GIF | Extremely broad historical browser and application support |
MDN recommends PNG for lossless or indexed still images and suggests WebP, AVIF, or APNG for modern animation sequences.3 Compatibility still matters, so test the exact browsers, applications, or publishing service used by your audience.
Converting GIF to PNG preserves only a selected frame unless the converter produces APNG. Converting it to JPEG removes animation and transparency, and JPEG's lossy compression can blur sharp text and flat-color artwork. When making an animated WebP or video, confirm that frame delays, looping, and frame disposal were translated correctly.
Metadata, privacy, and accessibility
GIF89a permits any number of Comment Extensions and also defines Application Extensions. Those blocks do not alter the rendered pixels, and a viewer may ignore comments entirely.2 They can still contain text or identifiers that you did not intend to publish. Re-encoding rather than simply renaming the file is the reliable way to produce a cleaned derivative, but keep the original if provenance matters.
Animated GIFs can also be distracting or inaccessible. They have no built-in pause button, captions, or audio description. For meaningful motion, a video with controls and an accessible text alternative is usually easier for viewers to operate. If GIF is required, keep the animation brief, avoid rapid flashing, and provide the same information in nearby text.
Footnotes
- Internet Assigned Numbers Authority. image/gif Media Type Registration. ↩
- CompuServe Incorporated. Graphics Interchange Format, Version 89a. The programming reference documents the GIF87a and GIF89a headers, color tables, image data, timing, transparency, comments, and application extensions. ↩ ↩2 ↩3 ↩4 ↩5 ↩6
- MDN Web Docs. Image File Type and Format Guide: GIF. ↩ ↩2 ↩3
- Adobe. Save Files in Graphics Formats in Photoshop: Save in GIF Format. ↩
- Poly implementation evidence: MIME recognition and filename inference are defined in
packages/polyschema/src/mime.rs; GIF decoding is routed through the image loader and thumbnail pipeline inpackages/polycommon/src/loader/image.rs; visual embeddings use a generated thumbnail inpackages/polycommon/src/modeling/image.rs; the viewer loads GIF bytes directly inpolystore/client/app/classes/gestures/useImageRendererGestures.ts; and the agent image path supplies a WebP thumbnail inpolystore/api/src/agent/backend/gemini.rs. ↩