I made a folder in assets and just use asset helper:
<img src="<?= asset('assets/upload/imgdogs') . '/' . $row->dogpic; ?>"
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I developed an app and everything was working very fine, even the upload and reading of image was working very fine until I uploaded to shared hosting server, The image stopped displaying and uploading of image stopped working.
I am using Laravel 5.5
All the images stored in "public/images"
stopped showing on my web pages.
I store uploaded images in "public/images"
I have also set permission for "images" 777
I get this error when I try to upload Can't write image data to path (images/UgSsxaCRXu3eZGC5jm7N.jpg)"
Here is my code
$fileName = str_random(20) . '.'. $request->file('pop')->getClientOriginalExtension(); $path = 'images/' . $fileName; $img = Input::file('pop');
Image::make($img->getRealPath())->save($path);
Any help will be appreciated
Please or to participate in this conversation.