# Fatal error: Uncaught ImagickException: Unsupported image format /tmp/phpXXXXXX in /var/www/app/src/Image/Converter.php:12

- **ID:** `php/imagick-format-not-supported`
- **Domain:** php
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The ImageMagick library cannot decode the given file because the format is not recognized, the file is corrupt, or the ImageMagick installation lacks support for the required format (e.g., HEIC, WebP).

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| php 8.1 | active | — | — |
| php 8.2 | active | — | — |
| ImageMagick 7.1 | active | — | — |
| Imagick 3.7 | active | — | — |

## Workarounds

1. **Check supported formats with `convert -list format` on the server, then install missing delegates, e.g., `apt-get install libheif-dev` and recompile ImageMagick.** (85% success)
   ```
   Check supported formats with `convert -list format` on the server, then install missing delegates, e.g., `apt-get install libheif-dev` and recompile ImageMagick.
   ```
2. **Convert the file to a supported format before processing using an external tool like `ffmpeg` or `gd` as a fallback.** (75% success)
   ```
   Convert the file to a supported format before processing using an external tool like `ffmpeg` or `gd` as a fallback.
   ```

## Dead Ends

- **Reinstalling the Imagick PHP extension without updating ImageMagick** — The PHP extension is just a wrapper; the underlying ImageMagick library must be installed with the required delegates (e.g., libheif for HEIC). (85% fail)
- **Increasing PHP memory limit** — The error is about format support, not memory; increasing memory will not make ImageMagick recognize an unsupported format. (95% fail)
