TIL

Resizing images for better social thumbnails

If you post an image that is sized to a 16:9 ratio, it won't be cropped at all when the thumbnail is displayed. This is nice, especially for text so you can just read it inline.

Enter the Swiss Army knife, ImageMagick (brew install imagemagick if you're using Homebrew):

convert source.png \
    -gravity center \
    -background white \
    -extent '16:9#' \
    dest.png

This will extend the canvas of source.png with a white background until it is 16:9 and output the result as dest.png.