resize-images

Solid

Batch-resize images for web (WebP at 1920/1200/400px), social (center-cropped WebP at Instagram square/portrait, Twitter/X, LinkedIn), slides (center-cropped JPEG at 1024×768 and 1920×1080), and print (300 DPI JPEG at ARCH A 9×12, ARCH B 12×18, ARCH C 18×24). Asks user for source folder, outputs resized copies into subfolders within that folder.

Web & Frontend 197 stars 41 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 90/100

Stars 20%
76
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# /resize-images — Image Resizer for Web, Social, and Print Resize project photos and renders for web publishing, social media, and print layouts. Always asks the user for the source folder before doing anything. Outputs resized copies into clearly named subfolders — originals are never modified. ## Step 1: Ask for the source folder Before doing anything else, ask: > "Which folder contains the images you'd like to resize?" Wait for the user's response. Accept any valid path — absolute, relative, or with `~`. Expand `~` to the user's home directory. Then ask: > "Which outputs do you need? (choose one or more) > - **Web** — WebP at 1920px (hero), 1200px (standard), 400px (thumb) > - **Social** — center-cropped WebP: Instagram square (1080×1080), Instagram portrait (1080×1350), Twitter/X (1200×675), LinkedIn (1200×627) > - **Slides** — center-cropped JPEG: standard 4:3 (1024×768), widescreen 16:9 (1920×1080) > - **Print** — 300 DPI JPEG at ARCH A (9×12), ARCH B (12×18), ARCH C (18×24) > - **All**" ## Step 2: Scan the folder List all image files in the folder (non-recursive). Supported formats: `.jpg`, `.jpeg`, `.png`, `.tif`, `.tiff`, `.webp`. ```python import os, sys folder = sys.argv[1] exts = {'.jpg', '.jpeg', '.png', '.tif', '.tiff', '.webp'} images = [f for f in os.listdir(folder) if os.path.splitext(f.lower())[1] in exts] images.sort() for img in images: print(img) ``` Report the count: `"Found N image(s) in [folder]. Ready to resize."` If the folder is em...

Details

Author
AlpacaLabsLLC
Repository
AlpacaLabsLLC/skills-for-architects
Created
3 months ago
Last Updated
yesterday
Language
HTML
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category