Batch image resizer with real presets
resize_imagesResizes a batch of 1+ images to a named real-world preset (App Store screenshots, Open Graph/social cards, Android launcher icon densities, a favicon set) or a custom width/height, using contain (whole picture, padded), cover (fills the frame, crops overflow) or stretch (distorts to fit) fitting. Each resized image is PNG-encoded (EXIF/ICC metadata stripped on re-encode, matching the source page) and every image is auto-rotated per its embedded EXIF orientation before resizing. All outputs are packaged into one uncompressed ZIP (PNG bytes are already compressed, so a second pass would not shrink them), foldered by preset (e.g. "social/photo-1200x630.png", or "android/mipmap-hdpi/icon.png" for the Android density preset, which names each size's folder after its density instead of suffixing the pixel size). This always returns as a resource_link (a batch ZIP is never small enough, or singular enough, to inline) -- fetch the link to get the archive. Per-file output dimensions and byte sizes are reported in the JSON result. Each input image (base64) is capped by this server's per-input byte limit.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"images": "<images>"
},
"name": "resize_images"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | How each image fills its target box. 'contain' keeps the whole picture and pads the gap with paddingColor. 'cover' fills the box and crops whatever hangs over. 'stretch' distorts the image to the exact box, ignoring aspect ratio. | contain |
| images | Yes | One to 60 images. Each is resized independently to every size in the chosen preset. A call is additionally capped at 48000000 total output pixels across images x sizes, so a preset with large or numerous sizes admits fewer images than one with small ones. | |
| preset | No | Which size(s) to produce for every image. appstore69: App Store screenshot, 6.9" iPhone, 1320x2868. appstore67: App Store screenshot, 6.7" iPhone, 1290x2796. appstoreIpad: App Store screenshot, 13" iPad, 2064x2752. androidIcon: Android launcher icon, 5 densities (48/72/96/144/192px, each output foldered as mipmap-mdpi/hdpi/xhdpi/xxhdpi/xxxhdpi). favicon: favicon set, 16/32/48/180/192/512px. og: Open Graph card, 1200x630. xcard: X (Twitter) summary card, 1200x628. linkedin: LinkedIn share image, 1200x627. igSquare: Instagram square post, 1080x1080. igPortrait: Instagram portrait post, 1080x1350. igStory: Instagram story, 1080x1920. youtube: YouTube thumbnail, 1280x720. custom: a single arbitrary size taken from customWidth/customHeight. | og |
| customWidth | No | Target width in px. Only used when preset is "custom". | |
| customHeight | No | Target height in px. Only used when preset is "custom". | |
| paddingColor | No | Hex color (e.g. "#ffffff") used to pad the frame when fit is "contain". Ignored for "cover" and "stretch". | #ffffff |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | Yes | How each image was fitted to its target box. | |
| sizes | Yes | How many target sizes the chosen preset expands to. | |
| preset | Yes | The preset that was applied, echoed from the input. | |
| outputs | Yes | Every produced file, so the archive can be checked without unzipping it. | |
| filesOut | Yes | How many files were produced, i.e. imagesIn x sizes. | |
| imagesIn | Yes | How many source images were supplied. | |
| paddingColor | Yes | The letterbox colour, which only applies to fit 'contain'. Null for 'cover' and 'stretch', where nothing is padded. |