Install
openclaw skills install @j3ffyang/resize-for-bannerResize an image into a Twitter/X header banner (5:2, 1500x600) using ImageMagick. The image is rescaled to fit and the leftover space is padded black — never cropped, so no content is lost. Use when the user wants a Twitter/X banner for an article or infographic. Twitter/X is the only target: LinkedIn and blog headers accept the original image, so never generate a derivative for them. Never overwrites the original — writes a new file beside it.
openclaw skills install @j3ffyang/resize-for-bannerTurn one image into a Twitter/X header banner with ImageMagick, keeping the original file untouched and writing a new file beside it. The image is rescaled to fit and black-padded, never cropped, so no content is lost.
| Platform | Ratio | Dimensions | Notes |
|---|---|---|---|
| Twitter / X | 5:2 | 1500x600 | Header photo. The only supported target. |
Not supported, on purpose:
-banner-linkedin.png derivative is never needed.source — Path to the original image, e.g. ai-thoughts/imgs/260806-1656.png. Required.imgs/<base>-banner-twitter.png — e.g. 260806-1656-banner-twitter.png.<base> keeps the original filename exactly. The original file is never modified.Confirm the plan with the user: source image and output filename. Get a go-ahead before writing the file.
Check the original dimensions with magick identify "<source>" so you can predict which axis will be padded.
Resize to fit, then pad with black with ImageMagick 7 magick:
magick <source> -resize "1500x600" -background black -gravity center \
-extent 1500x600 imgs/<base>-banner-twitter.png
-resize "1500x600" (no bang) scales to fit inside the box, preserving the aspect ratio — the image is never distorted or cropped.-extent 1500x600 then pads the leftover space; -background black makes the padding dark and -gravity center centers the image.Verify the output with identify — dimensions must be exactly 1500x600.
Report the output path and confirm the original is untouched (git status shows the new file as untracked, the original unmodified).
-banner-linkedin.png, -banner-youtube.png, or any other non-Twitter variant. Those platforms accept the original image. One target only.identify reports exactly 1500x600.identify output / git status).magick compare -metric AE <new> <existing> null: prints 0. Do not compare renders with md5sum — ImageMagick writes per-path metadata, so two identical images hash differently.imgs/ and ask which to use.magick is always installed on the user's machines — skip checking for it and run the commands directly.