Level 4
Solved it.
the public_path had to be removed.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi all,
Need some help with resizing an image before storing it.
I have deployed my application on GoDaddy and I get an error when trying to access the updated image in order to resize it.
error: Image source not readable
<-- PHP
if ($request->has('image')) {
$imagePath = $request['image']->store('uploads', 'public');
$image = Image::make(public_path("storage/{$imagePath}"))->fit(2200, 1000);
$image->save();
} else {
$imagePath = 'uploads/banner.jpg';
}
-->
I was thinking is something to do with the privacy of the folder store.
<-- PHP
if ($request->has('image')) {
$image = Image::make($data['image'])->fit(2200, 1000);
$image->save();
$imagePath = $image->store('uploads', 'public');
} else {
$imagePath = 'uploads/banner.jpg';
}
-->
I am trying to resize uploaded image before storing but I get an error Command (Store) is not available for driver (Gd).
anyone encountered this issue before, thank you!
Solved it.
the public_path had to be removed.
Please or to participate in this conversation.