From f58d567fb4246975f4f5c462bc08f3b06cc04151 Mon Sep 17 00:00:00 2001 From: John Mizerek Date: Tue, 10 Mar 2026 11:20:10 -0700 Subject: [PATCH] Fix DoorDash image import: scroll page in Playwright to trigger lazy-loaded images - Update render.js on dev server to scroll page before capturing images - Increase Playwright wait from 4s to 5s and timeout from 90s to 120s - Upsize DoorDash CDN thumbnails from 150px to 600px when downloading Co-Authored-By: Claude Opus 4.6 --- api/setup/analyzeMenuUrl.cfm | 2 +- api/setup/saveWizard.cfm | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/api/setup/analyzeMenuUrl.cfm b/api/setup/analyzeMenuUrl.cfm index 63fb53e..506de04 100644 --- a/api/setup/analyzeMenuUrl.cfm +++ b/api/setup/analyzeMenuUrl.cfm @@ -1044,7 +1044,7 @@ - + diff --git a/api/setup/saveWizard.cfm b/api/setup/saveWizard.cfm index 6bd1b1a..9639130 100644 --- a/api/setup/saveWizard.cfm +++ b/api/setup/saveWizard.cfm @@ -85,6 +85,12 @@ function downloadItemImage(itemID, imageUrl) { return false; } + // Upsize DoorDash CDN thumbnails to 600px for better quality + if (findNoCase("cdn4dd.com/p/", imageUrl) && findNoCase("width=150", imageUrl)) { + imageUrl = replaceNoCase(imageUrl, "width=150", "width=600"); + imageUrl = replaceNoCase(imageUrl, "height=150", "height=600"); + } + // Download the image http url="#imageUrl#" method="GET" timeout="30" result="httpResult" { httpparam type="header" name="User-Agent" value="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36";