GIF files in browser games
GIF is an old, widely supported image format limited to 256 colors, used for simple pixel art and short animations; in Go Bananas games it is usually better as a still image or a sprite sheet.
GIF (Graphics Interchange Format) stores images with a palette of at most 256 colors. It can hold several frames that play as an animation, and it can mark one color as fully transparent. Every browser can show it.
What GIF is good for in games
- Simple pixel art with few colors, where 256 colors are plenty.
- Short animated decorations shown as an image on the page, such as a spinning coin in a menu.
- Art you already have as GIF and don't want to convert.
GIF has real limits for games:
- 256 colors at most: photos and gradients look banded or speckled. Use JPEG or WebP for those.
- Hard-edged transparency only: a pixel is either fully see-through or fully solid, so curved edges look jagged. PNG and WebP have smooth transparency.
- Big animations: an animated GIF is often much larger than the same frames as a PNG sprite sheet.
- Animation doesn't play when a game draws it (see the tips).
Uploading GIF to Go Bananas
You can add a GIF in several places:
- the create panel: press 📎, or drag the file onto the chat;
- the Assets tab: Upload Asset;
- the game editor: its Assets tab (Upload New), its 📎 button, or by dragging the file onto the editor chat.
Uploading needs a signed-in account with a verified email.
| Limit | Value |
|---|---|
| File size | Up to 200 MB per file |
| Image size | Up to 65,536 pixels on a side, and 100 megapixels in total |
| Uploads | 20 per hour per account, 40 per hour per network |
| Total storage | 100 MB on a free account; 1 GB with Pro (and for accounts created before May 2026) |
The site checks that the file really is a GIF: its first bytes and its file type must match the .gif extension. Empty files are rejected.
When you add a GIF in the create panel, you see a preview, and nothing is uploaded until you choose Keep as Image. "Turn into 3D" is only offered for JPEG and PNG there.
GIFs are stored exactly as you uploaded them, frames and all. Unlike JPEG and PNG, they don't go through the metadata cleanup, so anything written into the file stays in it. Until you choose, only you can see the image.
Using GIF in your game
Each image has a name in your games: its filename without the extension, so coin.gif becomes "coin". Renaming the asset changes that name, and code that used the old name will no longer find it. If two of your images share a name, the newest one is used.
The easiest way is to ask the AI. In the create or edit box, type @ to pick one of your files; its name goes in as quoted text:
Use "coin" for the coins the player collects.
The AI receives the list of your files and matches the quoted name.
In code, every game gets window.GAME_ASSETS, where each image has a full web address. On a 2D canvas:
const coin = new Image();
coin.crossOrigin = 'anonymous';
coin.src = window.GAME_ASSETS.images['coin'].url;
coin.onload = () => ctx.drawImage(coin, x, y);
In a three.js game:
const texture = new THREE.TextureLoader().load(window.GAME_ASSETS.images['coin'].url);
texture.magFilter = THREE.NearestFilter; // keeps pixel art sharp
const coinMesh = new THREE.Sprite(new THREE.SpriteMaterial({ map: texture }));
getAssetUrl('coin') returns the same address; it looks through models, then images, then audio.
Games run in a sandbox where relative addresses don't work, so use the address from GAME_ASSETS (it's absolute) or another full https:// address. Any HTTPS image can load.
A game can see its creator's finished files (up to 100) and those of the games it was remixed from. In games you own, it also sees your own files.
Tips and common problems
- The animation is frozen in the game: browsers draw only one frame of an animated GIF on a canvas or as a 3D texture. The fix is a sprite sheet: one PNG with all the frames side by side, which the AI can animate, for example: Animate "coin-sheet" as 8 frames side by side.
- A decoration that should keep moving: show the GIF as an image element on the page instead of drawing it on the canvas; images on the page do animate.
- Jagged edges on transparent sprites: GIF can't do soft edges. Re-export as PNG or WebP.
- Banding in gradients and photos: that's the 256-color limit. Use JPEG or WebP.
- Canvas errors after drawing (getImageData fails): set
crossOrigin = 'anonymous'before settingsrc. - Deleting an image removes it right away, and games that use it lose it.
From ChatGPT or Claude
The Go Bananas app in ChatGPT and the connector in Claude can upload a GIF to one of your games with the upload_asset tool. It takes PNG, JPG, GIF and WebP, up to 5 MB, sent as base64 data. Images uploaded this way are attached to the game straight away and come back with their full address (https://gobananas.co/assets/...).