1
0
Fork 0
mirror of https://github.com/GuerillaStudio/now-playing synced 2024-11-29 21:01:41 +00:00

feat: Add lazy loading on album covers

This commit is contained in:
Tixie 2020-08-05 18:37:31 +02:00
parent 7364860ee9
commit 3729b63a44
2 changed files with 2 additions and 0 deletions

View file

@ -43,6 +43,7 @@
height="500"
style="background-image: url(data:{{ $placeholder.MediaType }};base64,{{ $placeholder.Content | base64Encode }});"
src="{{ $coverMedium.Permalink }}"
loading="lazy"
alt="{{ .Title }} album's cover"
title=":)"
>

View file

@ -50,6 +50,7 @@
style="background-image: url(data:{{ $placeholder.MediaType }};base64,{{ $placeholder.Content | base64Encode }});"
src="{{ $cover.Permalink }}"
srcset="{{ $cover.Permalink }} 1x, {{ $cover2x.Permalink }} 2x"
loading="lazy"
alt="{{ .Title }} album's cover'"
title="{{ .Title }} album's cover'"
>