diff --git a/frontend/src/components/gallery/layouts/MosaicGalleryLayout.tsx b/frontend/src/components/gallery/layouts/MosaicGalleryLayout.tsx index 341abe49..00778e23 100644 --- a/frontend/src/components/gallery/layouts/MosaicGalleryLayout.tsx +++ b/frontend/src/components/gallery/layouts/MosaicGalleryLayout.tsx @@ -55,11 +55,17 @@ const MosaicPhoto: React.FC = ({ const [likedLocal, setLikedLocal] = React.useState(false); const canComment = Boolean(feedbackEnabled && feedbackOptions?.allowComments && onQuickComment); + // Calculate aspect ratio from photo dimensions (fallback to 1 if unknown) + const aspectRatio = (photo.width && photo.height) ? photo.width / photo.height : 1; + return ( <>
{ e.stopPropagation(); onClick(e); @@ -68,7 +74,7 @@ const MosaicPhoto: React.FC = ({