I'm trying to save image encoded by base64 using Intervention Image, laravel-5 Exception told me that "Unable to init from given binary data". anyone can help?
$png_url = "user-".time().".png";
$path = "/public/".$png_url;
Image::make(base64_encode($request['image']))->save($path);
<?php
$png_url = "user-".time().".png";
$path = "/public/".$png_url;
$base=base64_decode($request['image']);
Image::make($base)->save($path);
?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With