← back to Wallco Ai
PDP Generated-rooms gallery: tile src uses /designs/room/design_<id>_<type>.png convention (was r.image_path /uploads/rooms 404 → black tiles) with onerror fallback to image_path — same fix family as admin/rooms
be7e221cd9e1cc9b72e3ce3d5440fead7c07b94c · 2026-05-29 22:42:40 -0700 · Steve Abrams
Files touched
Diff
commit be7e221cd9e1cc9b72e3ce3d5440fead7c07b94c
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Fri May 29 22:42:40 2026 -0700
PDP Generated-rooms gallery: tile src uses /designs/room/design_<id>_<type>.png convention (was r.image_path /uploads/rooms 404 → black tiles) with onerror fallback to image_path — same fix family as admin/rooms
---
server.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server.js b/server.js
index a07f03d..b4f61d0 100644
--- a/server.js
+++ b/server.js
@@ -17550,8 +17550,8 @@ ${FOOTER}
'</div>'
: '';
return '<figure style="margin:0;background:var(--paper,#faf8f2);border:1px solid var(--rule,#e5e5e0);position:relative;' + dim + '">' +
- '<a href="' + r.image_path + '" target="_blank" style="display:block;aspect-ratio:1/1;overflow:hidden;background:#000;" rel="noopener noreferrer">' +
- '<img src="' + r.image_path + '" alt="Room with this pattern — ' + tag + '" loading="lazy" style="width:100%;height:100%;object-fit:cover;display:block;" />' +
+ '<a href="/designs/room/design_' + r.design_id + '_' + r.room_type + '.png" target="_blank" style="display:block;aspect-ratio:1/1;overflow:hidden;background:#000;" rel="noopener noreferrer">' +
+ '<img src="/designs/room/design_' + r.design_id + '_' + r.room_type + '.png" onerror="this.onerror=null;this.src=\'' + r.image_path + '\'" alt="Room with this pattern — ' + tag + '" loading="lazy" style="width:100%;height:100%;object-fit:cover;display:block;" />' +
'</a>' +
adminCtrls +
'<figcaption style="padding:8px 10px 10px;font:11px/1.4 ui-sans-serif,system-ui,sans-serif;color:var(--ink-faint,#6e6e68);display:flex;justify-content:space-between;gap:8px;">' +
← 851af25 wallco PDP: gate unpublished /design/:id from public direct-
·
back to Wallco Ai
·
PDP gallery: drop inline onerror (broke inside server templa 25bdcd2 →