Update gallery images to use optimized Cloudinary URLs and portrait aspect ratio
Replaces Dropbox links with Cloudinary URLs, updates image aspect ratio to 9:16 for portrait display, and optimizes image loading in the gallery component and data. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 1f7e7e89-a520-4970-9645-37daadc466dc Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: e9285bb1-8736-4b8d-ad7c-317df87a118d Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/1f7e7e89-a520-4970-9645-37daadc466dc/tSWS0WO Replit-Helium-Checkpoint-Created: true
This commit is contained in:
+3
-11
@@ -353,7 +353,7 @@ export async function registerRoutes(
|
||||
}
|
||||
});
|
||||
|
||||
// Gallery API - serves shuffled photos from Dropbox
|
||||
// Gallery API - serves photos from Cloudinary (gallery-data.json)
|
||||
const folderArtists: Record<string, string> = {
|
||||
"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]) {
|
||||
|
||||
Reference in New Issue
Block a user