{{-- Image Viewer Component with error handling Variables: - $url: The URL of the image file - $item: The FileSystemItem model (optional) --}} @php $url = $url ?? null; $item = $item ?? null; // Create a unique key to force Alpine re-initialization when URL changes $viewerKey = 'img-' . md5($url ?? ''); @endphp
{{-- Loading State --}}
Loading preview...
{{-- Error State --}}

Preview not available

This image could not be loaded. It may be inaccessible or the URL has expired.

@if($url) Try Download @endif
{{-- Image --}} {{ $item?->getName() ?? 'Image preview' }}