Godot's "Cannot resize in compressed image formats" is not a problem with your sprite atlas file. It is a one-line guard inside Image::resize, and there are two sibling messages next to it that mean completely different things. Telling the three apart takes about five seconds once you know what to look for.
What the message actually says
The verbatim string is:
Cannot resize in compressed image formats.
It comes from core/io/image.cpp:1269, at the top of Image::resize. The check runs before any scaling math: if the Image still carries the compressed flag, the function refuses and bails out with ERR_FAIL_MSG. The pixels were never decoded, so there is nothing to resample.
That is why the message never mentions a file name, a frame, or a size. It is not telling you the atlas is broken. It is telling you the buffer is still in an encoded format.
The three cases that look identical
Same function, three different guards, three different fixes:
- Cannot resize in compressed image formats. (this one) - the buffer is still compressed. Fix the format, not the size.
- Cannot resize image before creating it, use set_data() first. - the Image exists but has no pixel data at all, usually because it was constructed empty and never given a size. Fix by calling create() or set_data() before resize.
- Too many pixels for image, maximum is %d pixels. - the buffer is fine, but width times height exceeds the engine cap. Fix by shrinking the source.
If you are scaling a runtime thumbnail and the log says the first one, resizing harder will never help. If it says the second one, your image is a 0x0 shell. If it says the third one, your reference render is simply enormous.
Why it usually fires on WebP and on compressed imports
Two common entry points leave you holding a compressed Image:
- You loaded a .webp (or a texture whose import settings kept a compressed format) and then asked for a smaller copy.
- You wrote a thumbnail step that runs on every texture, and it hit the one texture in the project that is still compressed while the rest are RGBA8.
The fix, in four lines
Check first, then convert, then resize:
if img.is_compressed():
img.decompress()
img.resize(new_w, new_h, Image.INTERPOLATE_LANCZOS)
If decompress() is not what you want, img.convert(Image.FORMAT_RGBA8) gives you an uncompressed buffer explicitly. Both are cheaper than the debugging session that follows a silent skip.
And for the pipeline question underneath it: do not resize compressed images at runtime at all. Generate the thumbnail during import, keep the runtime path on uncompressed data, and the guard never fires.
A checklist that survives the next refactor
- Log img.is_compressed() and img.get_size() right before the resize call. If the size is 0x0, you have the set_data case, not this one.
- Assert the product of width and height against the engine cap before you allocate anything big.
- Keep one helper that owns "load, decompress, resize" so the order cannot drift per call site.
- When an error page and the engine disagree, trust the line number in core/io/image.cpp, not the forum answer.
Reference pages for all three
- https://atlas-errors.petersoncool.workers.dev/error/godot-image-cannot-resize-compressed/ - this message, source line, and the three fixes
- https://atlas-errors.petersoncool.workers.dev/error/godot-image-resize-before-set-data/ - the set_data sibling
- https://atlas-errors.petersoncool.workers.dev/error/godot-image-too-many-pixels/ - the pixel-cap sibling
- https://atlas-errors.petersoncool.workers.dev/errors/godot/ - the Godot index, 35 messages with cause and fix
All 123 references are readable for free, no email. If you would rather check a broken atlas file directly in the browser, there is a free checker that runs entirely on your machine: https://atlas-errors.petersoncool.workers.dev/inspector/tool
The desktop checker is also free and stays free: https://atlas-errors.petersoncool.workers.dev/fixer/
If you want the whole set offline - 110 single references plus 13 merged pages, the searchable CSV index and a self-test kit - it is a one-time $19: https://atlas-errors.petersoncool.workers.dev/checkout/