Skip to content

Center the showcase link preview image for square crops - #212

Merged
tbolis merged 1 commit into
masterfrom
feature/showcase-share-image-crop
Nov 4, 2026
Merged

tbolis merged 1 commit into
masterfrom
feature/showcase-share-image-crop

Conversation

@tbolis

@tbolis tbolis commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Summary

In the compact card of Slack, the link preview image is cropped to the middle of the picture in a nearly square box, so the 1200 x 630 image showed half of the brush and "react-sk" (the layout of #211 had the brush on the left and the title on the right).

  • og-image.png is redrawn with the brush, "react-sketch", "Showcase" and a tagline in one column in the middle. All of it is inside the middle 630 pixel square, so a square or nearly square crop shows it whole, and the wide cards (Twitter, Facebook, LinkedIn, the large card of Slack) show it with plain background at the sides.
  • Same size (1200 x 630), 42 KB, no change to the tags.

Verification

  • The build emits an og-image.png identical to the one in packages/showcase/public.
  • Simulated crops of the new image, a 630 x 630 square at the middle and a 600 x 530 window, keep the brush, the title and the tagline in view.
  • Not verified: the preview in Slack. Merging deploys it (the change is under packages/), and Slack keeps old previews, so post the link again with a query, for example https://tbolis.github.io/react-sketch/?v=3.

…hats

Chats such as Slack crop the middle of the image to a nearly square box in the compact
card, which cut the brush and the title of the 1200 x 630 image. The brush, the title and the
tagline are now in a column in the middle, inside the 630 pixel square that stays visible.
@tbolis
tbolis merged commit 4dc4bc1 into master Nov 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant