- Have you checked the permissions on the image file?
- Do you have the images stored in assets('assets/images' and not assets('images')?
Sep 21, 2018
3
Level 1
Unable to init from given binary data | Intervention | Laravel 5.6
Hello,
I am using the image intervention library to store my images and convert them with the proper size.
Let's say I have uploaded one 5MB image which is stored in the base folder then, We have to take that original image and crop them in various sizes for this purpose we used the following code
$img = Image::make(asset('assets/images/sample.png'));
$img->crop(3000,4000,100,200);
$img->fit(500, 625);
$img->save(Storage path);
However, it giving me the error like -
{message: "Unable to init from given binary data.",…}
exception: "Intervention\Image\Exception\NotReadableException"
file: "/public_html/project/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php"
line: 113
We have tried by sending URL path and Storage path too but same error.
Any would be appreciable.
Thank you
Please or to participate in this conversation.