anonymouse703's avatar

Image Error 404 on editing record

When I edit records with Images I got error 404.

I save the images in the storage/photos and display it when I upload like this

@if ($photos)
    Photo Preview:
    <div class="row">
         @foreach($photos as $photo)
        <div class="col-md-4 pt-2">
          <img src="{{ $isUploaded ? $photos->temporaryUrl() :  url('storage/photos/'.$photo)  }}" width="200" height="250"> 
        </div>
        @endforeach
    </div>
@endif 

I got this error
`Failed to load resource: the server responded with a status of 404 (Not Found)`
when I hover the image error it's someting like this `www.sites.test/storage/photos/image_name`
0 likes
4 replies
SilenceBringer's avatar
Level 55

@anonymouse703 $img->storeAs('public/images' will result in file path like storage/app/public/public/images

Can you check you storage/app/public directory to see where file actually placed?

Please or to participate in this conversation.