lazy-load record covers to avoid 429 responses
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
David 2023-03-05 08:48:26 -05:00
parent db3387aac9
commit 2e3359df7a

View File

@ -131,7 +131,7 @@ function RecordTemplate({
year,
discogsURL,
}) {
return `${coverURL ? `<img src="${coverURL}"/>` : ""}
return `${coverURL ? `<img src="${coverURL}" loading="lazy"/>` : ""}
<h1>${name}</h1>
<h2>${artists.join(", ")}</h2>
<span>${identifier}</span><br/>
@ -149,7 +149,7 @@ function RecordTemplate({
function TableRowTemplate({ name, coverURL, discogsURL }) {
return `<div class="record">
<img class="cover" src="${coverURL}"/>
<img class="cover" src="${coverURL}" loading="lazy"/>
<span class="name">${name}</span>
<a
target="_blank"