diff --git a/packages/web/src/components/chat/embeds/ImageEmbed.tsx b/packages/web/src/components/chat/embeds/ImageEmbed.tsx index f4cc0c57..54f31186 100644 --- a/packages/web/src/components/chat/embeds/ImageEmbed.tsx +++ b/packages/web/src/components/chat/embeds/ImageEmbed.tsx @@ -10,12 +10,16 @@ export function ImageEmbed({ embed }: ImageEmbedProps) { const openImagePreview = useUIStore((s) => s.openImagePreview); const imageUrl = embed.image ?? embed.url; + const style: React.CSSProperties = embed.width && embed.height + ? { aspectRatio: `${embed.width}/${embed.height}`, maxWidth: Math.min(embed.width, 400), maxHeight: 300 } + : { aspectRatio: '4/3', maxWidth: 400, maxHeight: 300 }; + return ( -