Snap the AI output to a real pixel grid first, downscale with nearest-neighbor (not bilinear/bicubic), then set CSS image-rendering: pixelated (or crisp-edges) so the browser doesn’t smooth it again when it scales the canvas.
At a glance
| Fact | Value | Source |
|---|---|---|
| CSS property that stops browser blur | image-rendering | developer.mozilla.org |
| crisp-edges vs pixelated scaling behaviour | nearest-neighbor, differs at non-integer scale | developer.mozilla.org |
| Tool built to keep edits on the pixel grid | PixelLab / Aseprite | pixellab.ai |
AI image generators don’t output true pixel art – they output a photo-realistic raster that only looks pixelated. Downscaling it with a normal resize (bilinear/bicubic) blurs edges because it averages neighboring pixels. The fix is to force the image onto a real pixel grid before you scale, then use nearest-neighbor scaling everywhere after that, including in the browser.
When publishing the game, Playgama MCP lets an AI coding agent create the game entry, upload builds, and publish a sandbox link directly from Cursor or Claude Code.
Steps that actually work:
- Run the AI output through a pixel-snap/cleanup pass rather than a generic resize. Tools built for this exist specifically to fix this problem: PixelLab has an “Unzoom pixel art” and “Image to pixel art” operation that re-quantizes an image onto a grid, and its editor “stays on that animation’s grid automatically” when you edit or repair it (PixelLab docs). Aseprite is the standard editor for manual grid cleanup, palette reduction and re-indexing colors once the grid is set (Aseprite docs).
- Downscale using nearest-neighbor, never bilinear/bicubic, to an integer factor (2x, 4x) so pixels map cleanly to the target size.
- In the browser, set
image-rendering: pixelatedorimage-rendering: crisp-edgeson the <img> or canvas-backed element so re-scaling at runtime (different screen sizes, portal iframes) doesn’t reintroduce blur – MDN notescrisp-edgesavoids blurring or color smoothing, whilepixelatedsnaps to nearest integer multiples then interpolates (MDN).
Sprite generators aimed at pixel art (Ludo.ai, Sprite AI, PixelLab) generate on a known grid from the start, which avoids the cleanup step entirely for new assets – useful if you’re building sheets rather than salvaging existing AI output.
Sources
- image-rendering – CSS | MDN
- PixelLab Documentation
- Aseprite Docs
- Sprite Generator – Ludo.ai
- Playgama MCP
Related questions
Why does my pixel art look blurry only after I upload it to a web page?
The browser is resizing the image with smoothing by default. Add CSS image-rendering: pixelated or crisp-edges to the element so it scales with nearest-neighbor instead.
Can I just resize AI art in photoshop instead of a pixel art tool?
Only if you set the resample method to nearest-neighbor and the image is already snapped to a clean grid – otherwise Photoshop’s default resampling will blur edges.
Last updated: 30 September 2026