fix: handling of images fixed

This commit is contained in:
2026-02-10 22:59:05 +01:00
parent 6bbf13dd41
commit 77e117ae06
6 changed files with 61 additions and 10 deletions

View File

@@ -580,10 +580,14 @@ const MediaList: React.FC = () => {
>
{item.mimeType.startsWith('image/') ? (
<div className="media-thumbnail">
{/* Would load actual image in production */}
<svg width="32" height="32" viewBox="0 0 24 24" fill="currentColor" opacity="0.5">
<path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/>
</svg>
<img
src={`bds-media://${item.id}`}
alt={item.alt || item.originalName}
onError={(e) => {
const target = e.target as HTMLImageElement;
target.style.display = 'none';
}}
/>
</div>
) : (
<div className="media-thumbnail">