From 41d0785db4a141d78d350f85dd17e92beec2d109 Mon Sep 17 00:00:00 2001 From: Junwei Zhao Date: Tue, 1 Jul 2025 22:13:50 +1000 Subject: [PATCH] Update image fetch logic --- links/templates/links/mini_apps/image_gallery.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/links/templates/links/mini_apps/image_gallery.html b/links/templates/links/mini_apps/image_gallery.html index 9d83144..e7ef006 100644 --- a/links/templates/links/mini_apps/image_gallery.html +++ b/links/templates/links/mini_apps/image_gallery.html @@ -615,8 +615,14 @@ // Get image URL based on source function getImageUrl() { - const width = window.innerWidth; - const height = window.innerHeight; + var width = window.innerWidth; + if (width < 300) { + width = 300; // Minimum width + } + var height = window.innerHeight; + if (height < 300) { + height = 300; // Minimum height + } if (config.imageSource === 'picsum') { const imageId = getRandomImageId();