Files
opensem/resources/views/vendor/media-library/responsiveImageWithPlaceholder.blade.php
Ludovic CANDELLIER b50f50ea62 [WIP] Refactor project
2021-05-21 00:21:05 +02:00

2 lines
407 B
PHP

<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 }}">