share-cards: social images from one HTML file
Every social site wants a different image size. share-cards turns one HTML design into all of them, with each platform's cropping in mind. It's free on GitHub.
Setting up our social profiles meant making a lot of images. A link preview is 1200 by 630 pixels. An X header is 1500 by 500, with your profile picture covering one corner. YouTube channel art is 2560 by 1440, but phones only show a thin strip across the middle.
We didn’t want to redraw the same design ten times, so we built a tool that does it for us. Today it’s our next open source release.
share-cards
share-cards takes one design, written as an ordinary web page, and saves it as an image at every size you need. It knows each platform’s safe area, the part that’s never cropped, so titles and logos stay in view.
Nine sizes come built in: link previews, X and LinkedIn headers, YouTube channel art, Instagram posts and stories, and profile pictures. Anything else is a width and a height away.
The design is yours. Any font, colour or graphic a web page can show will turn up in the image. Render one card from the command line, or list a whole batch in one file and make them all at once.
We built it from the scripts that make the images for every post on this site and on our social profiles. It runs on Mac, Windows and Linux with Node and Chrome, and it’s free under the Apache 2.0 license.
View share-cards on GitHub · Project page
More this month
This is the second of six open source releases leading up to Halloween. Find the rest on GitHub, or sign up for updates.
More from Firedance
-
Music sync and the ECG: measuring a beat
A heart monitor and a music-synced light show solve the same problem: turning a noisy waveform into beats and a rate. Where the two match and where they differ.
-
Mixing smart light brands in one room
We run WiZ, LIFX, Govee, GE Cync and Sengled lights side by side. What we wish we'd known about pairing, routers and mixing smart light brands in one room.
-
kicad-fab-tools: circuit board orders, checked
Ordering a circuit board takes a stack of files and careful checking. kicad-fab-tools turns a KiCad design into an order and catches costly mistakes.