Issue Checklist
Platform
macOS
Version
v1.7.24
Bug Description
When a link provides og:image metadata, the OG preview card image may overflow its container and cannot be displayed properly.
In OGCard.tsx, the PreviewImageContainer has a fixed height of 9rem with overflow: hidden, and the PreviewImage uses object-fit: cover. For some images (especially those with unusual aspect ratios), the image gets heavily cropped and the important content may not be visible, making the preview card less useful.
Related code: src/renderer/src/components/OGCard.tsx
const PreviewImageContainer = styled.div`
width: 100%;
height: ${IMAGE_HEIGHT}; // fixed 9rem
min-height: ${IMAGE_HEIGHT};
overflow: hidden;
`
const PreviewImage = styled.img`
width: 100%;
height: ${IMAGE_HEIGHT};
object-fit: cover; // crops the image
`
Steps To Reproduce
- In a chat conversation, send or receive a message containing a link that provides
og:image metadata
- The OG preview card renders below the link
- Observe that for some links, the
og:image is cropped/overflowed and cannot display the full content
Expected Behavior
The og:image in the OG preview card should be displayed properly without important content being cropped or overflowing. Consider using object-fit: contain or providing a fallback mechanism so that the image fits the container while remaining fully visible.
Relevant Log Output
No response
Additional Context
The container dimensions are fixed at 380px × 220px with the image area taking 9rem height. Images with significantly different aspect ratios than the expected landscape format will be heavily cropped by object-fit: cover.
og:image Size Standards
The Open Graph protocol has industry-standard recommended image dimensions:
| Platform |
Recommended Size |
Aspect Ratio |
Min Size |
| Facebook |
1200×630 |
1.91:1 |
200×200 |
| Twitter/X |
1200×675 |
1.91:1 |
300×157 |
| LinkedIn |
1200×627 |
1.91:1 |
— |
| Pinterest |
1000×1500 |
2:3 |
— |
The dominant standard is 1200×630px (1.91:1 landscape). Most well-configured websites follow this convention, so the current fixed-height object-fit: cover approach works for them.
However, this issue is more likely to be triggered by:
- Non-standard og:image — e.g., square logos or vertical images used as og:image
- Pinterest-style tall images — 2:3 ratio gets severely cropped in a landscape container
- Fallback images — when no og:image is set but a fallback image is used, the dimensions are unpredictable
Issue Checklist
Platform
macOS
Version
v1.7.24
Bug Description
When a link provides
og:imagemetadata, the OG preview card image may overflow its container and cannot be displayed properly.In
OGCard.tsx, thePreviewImageContainerhas a fixed height of9remwithoverflow: hidden, and thePreviewImageusesobject-fit: cover. For some images (especially those with unusual aspect ratios), the image gets heavily cropped and the important content may not be visible, making the preview card less useful.Related code:
src/renderer/src/components/OGCard.tsxSteps To Reproduce
og:imagemetadataog:imageis cropped/overflowed and cannot display the full contentExpected Behavior
The
og:imagein the OG preview card should be displayed properly without important content being cropped or overflowing. Consider usingobject-fit: containor providing a fallback mechanism so that the image fits the container while remaining fully visible.Relevant Log Output
No response
Additional Context
The container dimensions are fixed at
380px × 220pxwith the image area taking9remheight. Images with significantly different aspect ratios than the expected landscape format will be heavily cropped byobject-fit: cover.og:image Size Standards
The Open Graph protocol has industry-standard recommended image dimensions:
The dominant standard is 1200×630px (1.91:1 landscape). Most well-configured websites follow this convention, so the current fixed-height
object-fit: coverapproach works for them.However, this issue is more likely to be triggered by: