image
image copied to clipboard
Found the opacity() not working in jpg format
I also have an issue on opacity when working on jpg format, png files are fine tho.
Image::make('public/foo.jpg')->opacity(50);
The execution time for more than 30 seconds
JPEG format doesn't support transparency.
Hi, I updated my php to version to 8 and suddenly the code below stopped working.
Exception: throw new NotReadableException("Image source not readable");
Intervention::make(public_path('images/logo.png'))->opacity(50);
But it will work when i removed the ->opacity(50)
.
Any ideas?
Does the following give you true
?
var_dump( (bool) filter_var(public_path('images/logo.png'), FILTER_VALIDATE_URL) );
By the way, as you are using public_path()
, you are pointing to an external URL (i.e. "http: //www.your-site.com/images/logo.png"). That's very inefficient (it fetches the image from HTTP), you should consider using resource_path()
instead to read the file locally.
The implementation of this function was rather poor and very resource-hungry. I decided to drop this function in the new version 3 of Intervention Image.