Compare commits

...
4 changed files with 8 additions and 0 deletions
@@ -265,6 +265,8 @@ export default function MediaPage() {
onError={(e) => {
(e.currentTarget as HTMLImageElement).src = PLACEHOLDER_IMAGES.DEFAULT;
(e.currentTarget as HTMLImageElement).style.opacity = "0.3";
// Set the `data-brokenurl` property for debugging the broken images:
(e.currentTarget as HTMLImageElement).dataset.brokenurl = media.url || "";
setMedia(prev => ({ ...prev, isLoaded: true }));
}}
onLoad={() => setMedia(prev => ({ ...prev, isLoaded: true }))}
@@ -141,6 +141,8 @@ const CompletedCard = ({
task.mediaFileClass,
);
e.currentTarget.style.opacity = "0.3";
// Set the `data-brokenurl` property for debugging the broken images:
(e.currentTarget as HTMLImageElement).dataset.brokenurl = task.thumbnailUrl;
}}
className="h-full w-full object-cover"
/>
@@ -663,6 +663,8 @@ export const GalleryModal = React.memo(
e.currentTarget.src =
PLACEHOLDER_IMAGES.DEFAULT;
e.currentTarget.style.opacity = "0.3";
// Set the `data-brokenurl` property for debugging the broken images:
(e.currentTarget as HTMLImageElement).dataset.brokenurl = item.thumbnail || "";
handleImageError(item.thumbnail!);
}}
disableTooltipAndBadge={mode === "select"}
@@ -409,6 +409,8 @@ export function LightboxModal({
e.currentTarget.src =
PLACEHOLDER_IMAGES.DEFAULT;
e.currentTarget.style.opacity = "0.3";
// Set the `data-brokenurl` property for debugging the broken images:
(e.currentTarget as HTMLImageElement).dataset.brokenurl = url || "";
}
}}
onLoad={() => {