mirror of
https://github.com/GuerillaStudio/now-playing
synced 2024-11-09 14:31:51 +00:00
feat: Add lazy loading on album covers
This commit is contained in:
parent
7364860ee9
commit
3729b63a44
2 changed files with 2 additions and 0 deletions
|
@ -43,6 +43,7 @@
|
||||||
height="500"
|
height="500"
|
||||||
style="background-image: url(data:{{ $placeholder.MediaType }};base64,{{ $placeholder.Content | base64Encode }});"
|
style="background-image: url(data:{{ $placeholder.MediaType }};base64,{{ $placeholder.Content | base64Encode }});"
|
||||||
src="{{ $coverMedium.Permalink }}"
|
src="{{ $coverMedium.Permalink }}"
|
||||||
|
loading="lazy"
|
||||||
alt="{{ .Title }} album's cover"
|
alt="{{ .Title }} album's cover"
|
||||||
title=":)"
|
title=":)"
|
||||||
>
|
>
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
style="background-image: url(data:{{ $placeholder.MediaType }};base64,{{ $placeholder.Content | base64Encode }});"
|
style="background-image: url(data:{{ $placeholder.MediaType }};base64,{{ $placeholder.Content | base64Encode }});"
|
||||||
src="{{ $cover.Permalink }}"
|
src="{{ $cover.Permalink }}"
|
||||||
srcset="{{ $cover.Permalink }} 1x, {{ $cover2x.Permalink }} 2x"
|
srcset="{{ $cover.Permalink }} 1x, {{ $cover2x.Permalink }} 2x"
|
||||||
|
loading="lazy"
|
||||||
alt="{{ .Title }} album's cover'"
|
alt="{{ .Title }} album's cover'"
|
||||||
title="{{ .Title }} album's cover'"
|
title="{{ .Title }} album's cover'"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in a new issue