How Publish makes smaller copies of your media, low-memory previews for phones and levelled sounds — without ever touching your originals.
Media Cooking
Every time you publish, the Cook assets step prepares your media so players download less and low-memory phones stay stable. Cooking never replaces or deletes your files: it stores extra, smaller copies next to them, and players only receive a copy once it has been made and published.
Where to author it#
- Asset Manager → Media → Clean up unused files → Cooked assets shows what has been cooked,
what is waiting, and what is over budget. Check refreshes the numbers; Cook now cooks without publishing.
- Publish runs the same step automatically (up to 240 files per publish; the rest are cooked on
the next publish).
- AI tools:
GET /api/ai/media/cook(report) andPOST /api/ai/media/cook(dry run unless you sendconfirm: true).
What cooking makes#
| Output | Made for | What players get |
|---|---|---|
| Thumbnail (≤128 px) | Every raster image | Palettes, pickers and the Media Manager grid load the thumbnail instead of the full file. |
| Lossless PNG | Any PNG over 32 KB that re-compresses at least 10% smaller | The same image, pixel for pixel, in fewer bytes. Checked pixel by pixel — if even one pixel would differ, the copy is thrown away. Safe for sprite sheets and tilesets. |
| WebP | Painted art only (see below) over 256 KB, when it saves at least 10% | A visually equivalent, much smaller file. Never made for pixel art. |
| Low-memory preview | Painted art only larger than 2048 px on a side | Phones and devices with 4 GB of RAM or less load a 2048 px copy, drawn at the original's size. |
| Sound level | Uncompressed WAV sounds | The game measures the file's loudness and plays it at a common level (quiet files a little louder, loud files quieter) without re-encoding it. |
| Size budget check | Everything | Warnings for images over 4096 px or 16 MB and audio over 25 MB. |
Pixel art vs painted art#
Cooking treats an image as pixel art — lossless only — unless it is clearly full-screen painted art. An image counts as painted when its folder or name mentions parallax, background, backdrop, battleback, title, panorama, loading, splash, cover, picture, illustration, artwork, skybox or "bg", and nothing in its type, folder or name says tiles, tileset, sprite, sheet, character, face, icon, animation, autotile, system, wall or object. Tilesets, sprite sheets, icons and fonts are always pixel art.
To override the guess for one file, set cookArt in the media item's metadata to "pixel" or
"painted" (AI tools can do this through the media update tools). The file is re-cooked when its
bytes change or the cooking recipe is updated.
Set it up#
- Upload or import your media as usual.
- (Optional) Open Cooked assets and press Check to see how many files are waiting.
- Publish. The Cook assets step reports how many files it cooked, how many smaller copies it
made and how many sounds it levelled.
- Publish again if the step says files are "left for the next publish".
Gotchas#
- Nothing changes in the editor. The editor always shows your original files; only players
receive the smaller copies.
- Players only get copies after a publish. A copy made by Cook now reaches players the next
time you publish.
- Remote/Docker database projects get thumbnails and budget checks but no smaller copies — the
report shows "not available for this database mode". Local projects store copies on disk, hosted projects in project storage.
- Only WAV sounds are levelled. MP3, OGG and M4A files are played as they are. Streamed music
tracks play at their authored level.
- Previews are for painted art only. A large sprite sheet is never downscaled; if it is over
4096 px, split it (see the budget warning).
- Old copies left behind when you replace a file are removed by Clean up unused files after the
grace period.
- There is no feature flag — cooking always runs as part of publish.