Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

cotations88's avatar

Show Image in Livewire Component

Hi everyone my livewire component is displaying image link instead of image format..

home livewire

 @if(is_array($medias) || is_object($medias))
                                @foreach( $medias as $media)
                                <div class="p-1 {{ count($medias)==1 ? 'col-12':'col-xs-4 col-sm-4'}}"><a href="{{Storage::url($media)}}" data-lightbox="roadtrip"class="{{$loop->index > 3 ? 'position-relative d-block' : ''}}"><img src="{{Storage::url ($media)}}" class="rounded-3 w-100" alt="image">
                                @if($loop->index > 3)
                                    <span class="img-count font-sm text-white ls-3 fw-600"><b>+{{count($medias)-3}}</b></span>
                                    @endif
                                </a></div>
                               
                                @endforeach
                                 @endif

Inspector code

src="http://127.0.0.1:8000/storage/posts/images/A2dnm6PFPpcUwsIhhIaiQEvVJgveq8rxXhbjknof.jpg"
0 likes
1 reply
Snapey's avatar

use your browser tools to check for errors in the console and network files not loaded

Please or to participate in this conversation.