From 8456831a04e904afdf3057dcdbe9925e8a37377c Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Thu, 9 Jul 2026 18:37:41 +0200 Subject: [mod] show img_load_error.svg if thumbnail fails to load (#6368) * [mod] show img_load_error.svg if thumbnail fails to load (#6368) Brave and a few other engines occasionally provide dead URLs for the thumbnails, which looks pretty ugly in the UI. As already with the image search, in case of an error img_load_error.svg should be displayed here. Signed-off-by: Markus Heiser * [build] /static (#6368) --------- Signed-off-by: Markus Heiser --- client/simple/src/js/main/results.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'client/simple/src/js') diff --git a/client/simple/src/js/main/results.ts b/client/simple/src/js/main/results.ts index 0f8692345..29cab399a 100644 --- a/client/simple/src/js/main/results.ts +++ b/client/simple/src/js/main/results.ts @@ -35,8 +35,9 @@ const imageLoader = (resultElement: HTMLElement): void => { }, 1000) as unknown as number; }; -const imageThumbnails: NodeListOf = - document.querySelectorAll("#urls img.image_thumbnail"); +const imageThumbnails: NodeListOf = document.querySelectorAll( + "#urls img.image_thumbnail, img.thumbnail" +); for (const thumbnail of imageThumbnails) { if (thumbnail.complete && thumbnail.naturalWidth === 0) { thumbnail.src = `${settings.theme_static_path}/img/img_load_error.svg`; -- cgit v1.2.3