Files
WMS/resources/views/vendor/media-library/responsiveImageWithPlaceholder.blade.php
2026-09-21 10:14:57 +01:00

6 lines
450 B
PHP
Executable File

<img{!! $attributeString !!} @if ($loadingAttributeValue) loading="{{ $loadingAttributeValue }}" @endif
srcset="{{ $media->getSrcset($conversion) }}"
onload="window.requestAnimationFrame(function(){if(!(size=getBoundingClientRect().width))return;onload=null;sizes=Math.ceil(size/window.innerWidth*100)+'vw';});"
sizes="1px" src="{{ $media->getUrl($conversion) }}" width="{{ $width }}" height="{{ $height }}"
alt="{{ $media->name }}">