@props([ 'id' => null, 'sizes' => '100vw', 'eager' => false, 'alt' => null, 'decorative' => false, ]) @php $media = app(\App\Support\MediaLibrary::class)->get($id); @endphp @if ($media && $media->isImage()) srcset()) srcset="{{ $srcset }}" sizes="{{ $sizes }}" @endif @if ($media->width) width="{{ $media->width }}" height="{{ $media->height }}" @endif alt="{{ $decorative ? '' : ($alt ?? $media->alt_text ?? '') }}" loading="{{ $eager ? 'eager' : 'lazy' }}" @if ($eager) fetchpriority="high" @endif decoding="async" {{ $attributes->class(['block']) }}> @endif