Unable to compress b64 images #169
Unanswered
ArunNetstager
asked this question in
Q&A
Replies: 1 comment
-
Hi guys, Your path can work but when you check it with
if your image exist it should work ! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have used a Jquery Image cropper in the frontend. So I get b64 code in my laravel controller and file saved to my storage location.
Then I'm trying to reduce my file size with my file's storage path.
Unfortunately, It's not working...!
Here is my codes in controller
`
$data = base64_decode($imageArray2[1]);
$imageName = time().'_'.Str::random(40).'.png';
Storage::disk('public')->put('admin/article/image/'.$imageName, $data);
app(OptimizerChain::class)->optimize(storage_path('app/public/admin/article/image/'.$imageName));`
Beta Was this translation helpful? Give feedback.
All reactions