@props(['path' => null, 'alt' => '', 'class' => 'object-cover w-full h-40', 'placeholder' => '/images/placeholder.png']) @php $url = null; try { if ($path && \Illuminate\Support\Facades\Storage::disk('public')->exists($path)) { $url = \Illuminate\Support\Facades\Storage::url($path); } } catch (\Exception $e) { $url = null; } $finalSrc = $url ?? asset($placeholder); @endphp {{ $alt }}merge(['class' => $class]) }} onerror="this.onerror=null;this.src='{{ asset($placeholder) }}'" />