Skip to content

Commit

Permalink
Lazy load images
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Oct 26, 2023
1 parent 66355d9 commit a7e362d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/realtime-compiler/resources/dashboard.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
<div class="col-lg-4 p-2 d-flex flex-grow-1">
<figure class="card w-100 p-2 mb-0">
@if(in_array($mediaFile->getExtension(), ['svg', 'png', 'jpg', 'jpeg', 'gif']))
<img src="media/{{ $mediaFile->getIdentifier() }}" alt="{{ $mediaFile->getName() }}" class="object-fit-cover w-100 rounded-2" style="height: 240px;">
<img loading="lazy" src="media/{{ $mediaFile->getIdentifier() }}" alt="{{ $mediaFile->getName() }}" class="object-fit-cover w-100 rounded-2" style="height: 240px;">
@else
<code style="height: 240px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, white 60%, transparent);" role="presentation">
@if($dashboard::isMediaFileProbablyMinified($mediaFile->getContents()))
Expand Down

0 comments on commit a7e362d

Please sign in to comment.