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

NotReadableException: Image source not readable #1

Open
mnlmaier opened this issue Nov 16, 2023 · 4 comments
Open

NotReadableException: Image source not readable #1

mnlmaier opened this issue Nov 16, 2023 · 4 comments

Comments

@mnlmaier
Copy link

mnlmaier commented Nov 16, 2023

Hi guys,

thanks for the nice plugin — just trying it out in a new project.

For some reason, and I cannot really pinpoint this to a single reproducible action / content change, I'm getting the following exception:

Intervention\Image\Exception\NotReadableException
Image source not readable

Thrown in vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php: 351 — did you, by any chance, stumble upon this issue during development and know what might cause this?

I'm glad to provide more debugging context in an emai if that might help :)

@ryanmitchell
Copy link
Contributor

Hi Manuel!

  • I've seen that error when intervention can't access the image file (permissions, not a file type it supports, or it no longer exists).

Are you passing a path or an asset?

@mnlmaier
Copy link
Author

mnlmaier commented Nov 17, 2023

@ryanmitchell Hi Ryan, thanks for your quick reply :)

I initially tried passing an asset, though I've quickly checked and the same error occurs when trying to pass a path. I figured it might be caused by an image not being readable, but it's pretty hard to debug. Weirdly enough, our image component is only used for images which have been uploaded through Statamic (ie. in our Pages' Page Builder Modules).

I have not had any issues with images being unreadable when BlurHash is disabled — or at least, I didn't spot any occurences where this might be a problem. All images are there.

Hmm... I'll try to dig into this a little more. Thanks :)

@mnlmaier
Copy link
Author

mnlmaier commented Nov 17, 2023

@ryanmitchell I've found a solution which I'd like to share, works for me now.

When called like this in {{ partial:components/image }}:
{{ blur_hash:image }}

This is working:

{{ partial:components/image :image="quote:person:photo" }}

This is not:

{{ partial:components/image image="{{ quote:person:photo }}" }}

This is not working if image is defined in the parent component:

{{ partial:components/image }}

This is working if image is defined in the parent component:

{{ partial:components/image :image="image" }}

Might not need a fix, just thought it would be helpful for people stumbling across this issue :) Guess that was mostly an oversight on my end!

@ryanmitchell
Copy link
Contributor

Thanks!

@thoughtco thoughtco locked as resolved and limited conversation to collaborators Nov 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants