where is your image on the filesystem?
Image not loading and not accessible on the browser
May I know why the image cannot be access on the browser I create a php artisan storage:link so the image I upload it save on my database and save on this folder storage/app/public/images/logo.png and have symlink to storage/images/logo.png? The problem the image it's not loading, I also check on the browser http://0.0.0.0/images/logo.png. I got 404 Not found. I use this to load the image on the page but not working.
My Form: FileUpload::make('logo') ->label('Logo') ->image() ->imagePreviewHeight('72') ->directory('images') ->previewable(true) ->getUploadedFileNameForStorageUsing( fn (TemporaryUploadedFile $file): string => (string) str($file->getClientOriginalName()) ->prepend('site-'), ),
@jcoder02k I don't know your correct paths, but ln works.
A suggestion, make a folder under public named img, like public\img, and place an image there and see if the asset helper displays it.
<img src="{{ asset('img') . '/' . $yourimage }}" alt="" class="image">
or
<img src="{{ asset('img') . '/' . 'yourimage.png' }}" alt="" class="image"> // direct
Changing class to your image class, and yourimage to your actual image.
Get this working, then pursue the correct symbolic link.
If above don't work, something is wrong with your setup, but with laravel setup right, it works.
Are you sure you are pointing to public as the document root, if not fix that first.
Please or to participate in this conversation.