# Atlas image errors: Image could not be decoded, Image URL must be a base64 data URL, Image resizer is unavailable

> Resize or re-encode the image before attaching it. Atlas's ImageSizeError reports both the actual and maximum dimensions, so the error tells you the target.

Atlas fails an image attachment with one of four distinct errors, and the message tells you which fix applies: Image could not be decoded means the file is corrupt or in an unusual format, so re-export it as a standard PNG or JPEG; Image URL must be a base64 data URL means you passed a plain http URL and hit InvalidDataUrlError; Image resizer is unavailable means no resizer is present in your build, so pre-shrink the image yourself; and an ImageSizeError carries bytes, max, width, height, max_width, and max_height, so resize the image to fit the maximums the error itself reports. Atlas auto-resizes when it can, using AUTO_RESIZE with a ladder of JPEG qualities.

## Symptom

Attaching an image to Atlas fails with one of: Image could not be decoded; Image URL must be a base64 data URL; Image resizer is unavailable; or an ImageSizeError carrying bytes, max, width, height, max_width, and max_height.

## Cause

Atlas's image pipeline models four distinct failures. Atlas auto-resizes when possible, using AUTO_RESIZE with a ladder of JPEG qualities, but raises SizeError with the concrete measurements when the image still exceeds the limits, and ResizerUnavailableError when no resizer is present. A plain http URL raises InvalidDataUrlError, and an unreadable file raises DecodeError.

## Fix

1. Resize or re-encode the image yourself before attaching it. The ImageSizeError reports both the actual and maximum dimensions, carrying bytes, max, width, height, max_width, and max_height.
2. Pass the image as a base64 data URL. A plain http URL raises InvalidDataUrlError with the message Image URL must be a base64 data URL.
3. Re-export a corrupt or unusual format as a standard PNG or JPEG if you hit DecodeError and see Image could not be decoded.
4. If the resizer is unavailable in your build and you see Image resizer is unavailable, pre-shrink the image rather than relying on auto-resize.
5. Re-attach the image in Atlas and confirm none of the four image errors is raised.

## Why does Atlas say Image could not be decoded

Atlas says Image could not be decoded when its image pipeline raises DecodeError, meaning the attached bytes could not be read as an image at all. Atlas models 4 distinct image failures, and DecodeError is the one that fires on a corrupt file or an unusual format the pipeline cannot parse.

Re-export a corrupt or unusual format as a standard PNG or JPEG if you hit DecodeError. A screenshot saved in an exotic container, a partially downloaded file, or an image whose extension does not match its actual bytes will all fail here. Opening the file in any image viewer and re-saving it as PNG or JPEG is usually enough. Image could not be decoded is not a size problem: a tiny corrupt file fails exactly the same way a large one does, so resizing it will not help.

## How to fix Image URL must be a base64 data URL in Atlas

Image URL must be a base64 data URL is Atlas's InvalidDataUrlError, raised when you pass a plain http URL instead of an inline image. Pass the image as a base64 data URL, because Atlas's image pipeline expects the bytes inline rather than a link it would have to fetch on your behalf.

Atlas does not go out to the network to fetch an image you reference by http URL. The image must arrive as a base64 data URL, which means encoding the file's bytes into the URL itself. Download the image first, then attach the local file, or encode it into a data URL directly. This is consistent with Atlas's broader posture on where your data goes: Atlas can build its code index with local Ollama embeddings, keeping code off third-party servers, and the image path likewise avoids fetching arbitrary remote URLs.

## What ImageSizeError with bytes, max, width, and height means

Atlas raises ImageSizeError carrying 6 measurements, bytes, max, width, height, max_width, and max_height, when an attached image still exceeds the limits after Atlas has tried to shrink it. Atlas auto-resizes when possible, using AUTO_RESIZE with a ladder of JPEG qualities, so a SizeError means even the lowest quality step was not enough.

The ImageSizeError is unusually helpful because it reports the concrete measurements on both sides: the image's actual bytes, width, and height, and the maximums, max, max_width, and max_height. Resize or re-encode the image yourself before attaching, using those maximums as the target. Because the error reports both the actual and maximum dimensions, you do not have to guess how far to shrink. Very large screenshots and multi-megapixel photographs are the usual offenders.

## How to fix Image resizer is unavailable in Atlas

Image resizer is unavailable is Atlas's ResizerUnavailableError, 1 of the 4 failures the image pipeline models, raised when no resizer is present in your build. Without a resizer, Atlas cannot run AUTO_RESIZE with its ladder of JPEG qualities, so pre-shrink the image yourself before attaching it.

If the resizer is unavailable in your build, pre-shrink the image rather than relying on auto-resize. Reduce the dimensions and re-encode as JPEG or PNG with any image tool before attaching, so the file is already within the limits when Atlas receives it. The caveat is honest: Image resizer is unavailable is a property of the build you are running, not something you can toggle in a config key, so the workaround is to do the resizing outside Atlas rather than to enable something inside it.

## How to verify the image attaches correctly

Verify an Atlas image fix by re-attaching the image and confirming that none of the four errors appears: Image could not be decoded, Image URL must be a base64 data URL, Image resizer is unavailable, or an ImageSizeError. A clean attach means the image passed decode, data URL, resize, and size checks.

Test the same file you were failing on, not a smaller stand-in, so you know the actual fix worked. If a new error replaces the old one, that is progress rather than a regression: fixing a DecodeError by re-exporting as PNG can reveal a SizeError behind it, because the pipeline could not measure an image it could not decode. Work through the errors in the order Atlas surfaces them, and use the measurements in the ImageSizeError as your resize target.

## FAQ

### Why does Atlas say Image could not be decoded?

Atlas raises DecodeError when the attached bytes cannot be read as an image, usually a corrupt file or an unusual format. Re-export the image as a standard PNG or JPEG and attach it again.

### How do I fix Image URL must be a base64 data URL in Atlas?

Pass the image as a base64 data URL. A plain http URL raises InvalidDataUrlError, because Atlas expects the image bytes inline rather than a remote link it would have to fetch.

### What does Atlas ImageSizeError mean?

ImageSizeError means the image still exceeds the limits after Atlas tried to shrink it. The error carries bytes, max, width, height, max_width, and max_height, so it reports both the actual and maximum dimensions.

### Does Atlas resize images automatically?

Yes, when possible. Atlas auto-resizes with AUTO_RESIZE using a ladder of JPEG qualities, but it raises SizeError with the concrete measurements when the image still exceeds the limits after those attempts.

### How do I fix Image resizer is unavailable in Atlas?

Image resizer is unavailable means no resizer is present in your build, so Atlas cannot auto-resize. Pre-shrink the image yourself with any image tool before attaching it rather than relying on auto-resize.

### Can I attach an image to Atlas by pasting a link?

No. A plain http URL raises InvalidDataUrlError with the message Image URL must be a base64 data URL. Download the image and attach it as a base64 data URL instead.

### How big can an image be before Atlas rejects it?

Atlas does not make you guess. The ImageSizeError carries max, max_width, and max_height alongside the image's actual bytes, width, and height, so the error itself reports the maximums for your setup.

---

Canonical HTML: https://runatlas.sh/resources/troubleshooting/image-too-large-or-undecodable
Source of truth: aeo_pages row `/resources/troubleshooting/image-too-large-or-undecodable` (segment: Troubleshooting) (this file is generated from it, never hand-edited).
Licence: Atlas is proprietary with a free core. It is not open source and there is no public source repository.
