[4.x]: Image 'does not appear to be an image'
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 705
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 134
Description
What happened?
Description
Some of our user supplied images are throwing an error in Sentry.io, stating that the image does not have any dimensions (Asset xxxxx is missing its width or height). The image attached in an example. The erroring images tend to be large, this one being 20mb, 300dpi, 8256x5504. JPEG.
If you try to edit the image in the editor (crop, flip etc) it fails when saving.
Original image: https://ibb.co/FgtvBLy
Is it due to the size, or something in the image itself, meta, color profile etc?
Craft CMS version
4.10.8
PHP version
8.2.21
Operating system and version
No response
Database type and version
No response
Image driver and version
Imagick 3.7.0 (ImageMagick 7.1.1-32)
Installed plugins and versions
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with the linked 20MB JPEG on Craft CMS 4.10.8 using PHP 8.2.21, Imagick 3.7.0, and ImageMagick 7.1.1-32. Compare image-dimension detection with the reported image properties and determine what behavior should allow editing to complete successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100