Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x]: Image 'does not appear to be an image' #15782

Open
ben-callaway opened this issue Sep 23, 2024 · 1 comment
Open

[4.x]: Image 'does not appear to be an image' #15782

ben-callaway opened this issue Sep 23, 2024 · 1 comment

Comments

@ben-callaway
Copy link

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.

CleanShot 2024-09-23 at 13 40 57@2x

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

@i-just
Copy link
Contributor

i-just commented Sep 24, 2024

Hi, thanks for getting in touch!

This sounds a lot like #13884 and #13687.

The error you’re seeing can be thrown in the following two places: Raster.php#L172 and Raster.php#L186.

In the second case, there should be an additional warning in the logs. If you check the logs you should be able to get a hint as to why that error is being thrown.

You could also check the database to see if the width and height values are there for this particular asset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants