diff --git a/frontend/src/components/common/ContentImageCell.tsx b/frontend/src/components/common/ContentImageCell.tsx index 9b46b34d..1b373f3d 100644 --- a/frontend/src/components/common/ContentImageCell.tsx +++ b/frontend/src/components/common/ContentImageCell.tsx @@ -97,7 +97,7 @@ export default function ContentImageCell({ image, maxPromptLength = 100 }: Conte {image.status === 'generated' && (
- {/* Always show image from image_path if available, otherwise from image_url */} + {/* Always load from image_path if available */} {image.image_path && image.image_path.trim() ? ( <> {prompt { - // Fallback to original URL if local image fails + // Show error placeholder if local image fails (no fallback to image_url) const target = e.target as HTMLImageElement; - if (image.image_url) { - target.src = image.image_url; - } else { - target.style.display = 'none'; - target.parentElement!.innerHTML = ` + target.style.display = 'none'; + const parent = target.parentElement; + if (parent) { + parent.innerHTML = `

Image not available

@@ -119,6 +118,7 @@ export default function ContentImageCell({ image, maxPromptLength = 100 }: Conte } }} /> + {/* Always show "View Original" button if image_url is available */} {image.image_url && ( ) : image.image_url ? ( + // Fallback: if no image_path, show image_url (for backward compatibility) -

Image not available

-
- `; + const parent = target.parentElement; + if (parent) { + parent.innerHTML = ` +
+

Image not available

+
+ `; + } }} />
) : (
-

No URL available

+

No image available

)}