From ec283b4bd93c5d62d7f2b75363c86e7a195499a2 Mon Sep 17 00:00:00 2001 From: Alan Grainger <16197738+alangrainger@users.noreply.github.com> Date: Mon, 23 Feb 2026 16:56:36 +1300 Subject: [PATCH] Add placeholder thumbnail on image error --- app/public/style.css | 14 ++++++++++++++ app/src/render.ts | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/public/style.css b/app/public/style.css index c8abb91..c1f80d8 100644 --- a/app/public/style.css +++ b/app/public/style.css @@ -30,6 +30,20 @@ html { object-position: center; } } +@media (min-width: 801px) { + #lightgallery a.thumb-error { + width: 250px; + height: 250px; + margin: 4px; + } +} + +#lightgallery a.thumb-error { + background: #2a2a2a; +} +#lightgallery a.thumb-error img { + display: none; +} .play-icon { position: absolute; diff --git a/app/src/render.ts b/app/src/render.ts index 2ad2b60..679d4b4 100644 --- a/app/src/render.ts +++ b/app/src/render.ts @@ -142,7 +142,7 @@ class Render { video ? `${description}`, + ` data-download="${this.getFilename(asset)}" data-slide-name="${asset.id}">${description}`, video ? '
' : '', '
' ].join('')