diff --git a/web/pqueue.js b/web/pqueue.js index 84ae8de..288395a 100644 --- a/web/pqueue.js +++ b/web/pqueue.js @@ -759,7 +759,7 @@ const url = new URL(`/api/pqueue/history/thumb/${row.id}`, window.location.origin); url.searchParams.set("_", String(Date.now())); const wrap = UI.el("div", { class: "pqueue-thumb-wrap" }); - const img = UI.el("img", { class: "pqueue-thumb", src: url.href, title: `history-${row.id}` }); + const img = UI.el("img", { class: "pqueue-thumb", src: url.href, title: `history-${row.id}`, loading: "lazy" }); attachFallback(wrap, img, galleryImages); wrap.appendChild(img); const count = UI.countImages(row); @@ -774,7 +774,7 @@ const first = images[0]; const url = UI.buildPreviewUrl(first, row.prompt_id); const wrap = UI.el("div", { class: "pqueue-thumb-wrap" }); - const img = UI.el("img", { class: "pqueue-thumb", src: url.href, title: first.filename }); + const img = UI.el("img", { class: "pqueue-thumb", src: url.href, title: first.filename, loading: "lazy" }); attachFallback(wrap, img, images); wrap.appendChild(img); if (images.length > 1) wrap.appendChild(UI.el("div", { class: "pqueue-thumb-badge", text: `${images.length}` }));