diff --git a/client/src/components/photo-gallery.tsx b/client/src/components/photo-gallery.tsx index c32c1a1..a71f79e 100644 --- a/client/src/components/photo-gallery.tsx +++ b/client/src/components/photo-gallery.tsx @@ -13,6 +13,7 @@ interface GalleryImage { const PAGE_SIZE = 24; function thumbUrl(src: string) { + if (src.includes("res.cloudinary.com")) return src; return `/api/gallery/thumb?src=${encodeURIComponent(src)}`; } @@ -321,7 +322,7 @@ export default function GalleryPage() { className="group relative rounded-lg overflow-hidden bg-card border border-card-border cursor-pointer flex flex-col" data-testid={`button-gallery-image-${i}`} > -
+
= { "2": "Folx Stadl", "3": "Folx Stadl", @@ -364,16 +364,8 @@ export async function registerRoutes( app.get("/api/gallery", async (req, res) => { try { - let data: any[] = []; - - if (isConnected()) { - data = await fetchGalleryFromDropbox(); - } - - if (data.length === 0) { - const galleryPath = path.join(process.cwd(), "server/gallery-data.json"); - data = JSON.parse(fs.readFileSync(galleryPath, "utf-8")); - } + const galleryPath = path.join(process.cwd(), "server/gallery-data.json"); + let data: any[] = JSON.parse(fs.readFileSync(galleryPath, "utf-8")); data = data.map((img: any) => { if (!img.artist && folderArtists[img.folder]) {