Social Media Resizer
Resize images to exact dimensions for Instagram, X, LinkedIn, and more.
Social Media Resizer takes one photo and redraws it at exact platform dimensions — "Resize images to fit popular social media dimensions." The "Platform Preset" dropdown lists eleven fixed slots with their pixel sizes inline, from "Instagram Post (1080×1080)" and "Instagram Story (1080×1920)" through "X/Twitter Header (1500×500)", "LinkedIn Banner (1584×396)", "Pinterest Pin (1000×1500)", and "YouTube Thumbnail (1280×720)".
The "Fit Mode" select decides how your image meets that frame: Cover (default) center-crops with Math.max scaling, Contain letterboxes on a black #000000 background, and Stretch distorts to fill. Click "Resize", compare "Original" vs "Result" file sizes, then Download. PNG sources stay PNG; other formats re-encode as JPEG 0.92. The entire pipeline is local canvas — no upload to any platform, you download and post yourself.
How it works
lib/imageSocialResizer.ts reads SOCIAL_PRESETS from types/index.ts, sizes a canvas to the preset width×height, and applies the fit mode: stretch draws directly; contain scales with Math.min and fills the background #000000; cover (default) scales with Math.max for center-crop. The Zod schema defaults preset to 'instagram-post' and fit to 'cover'; state lives in Redux socialResizerSlice.
Export via toBlob keeps PNG for PNG sources and otherwise re-encodes JPEG at 0.92, preserving the original filename. The result panel shows "Original" and "Result" byte sizes so you can judge the re-encode. There are no third-party libraries — pure Canvas 2D API, fully local, no network and no AI.
How to use
- Drop one image (accept image/*; single file).
- Open "Platform Preset" and pick a destination — option labels include the exact pixel size, e.g. "YouTube Thumbnail (1280×720)".
- Choose "Fit Mode": Cover (center-crop), Contain (letterbox on black), or Stretch.
- Click "Resize" (button reads "Resizing..." while the canvas draws).
- Compare the "Original" vs "Result" file-size stats.
- Click "Download" to save the resized file under its original filename, or "Start Over" to reset.
Tips
- Cover is the safe default — no letterbox bars, but edges crop.
- Contain paints a black (#000000) background — choose a light source or post-crop if you need white bars.
- Output MIME follows the source: PNG stays PNG; other types re-encode at JPEG 0.92.
- Presets are fixed slots — for arbitrary sizes, use image-resize instead of this tool.
Social Media Resizer FAQ
Does it upload my photo to social platforms?
No — resizing is local; you download the file and upload it yourself to the platform.
What's the difference between Cover and Contain?
Cover fills the preset and center-crops overflow; Contain fits the whole image and letterboxes with black (#000000).
Can I enter custom dimensions?
No — only the fixed SOCIAL_PRESETS are offered; use image-resize for custom sizes.
Which presets are available?
Eleven: Instagram (Post/Story/Landscape), X/Twitter (Post/Header), LinkedIn (Post/Banner), Facebook (Post/Cover), Pinterest Pin, and YouTube Thumbnail.
Is JPEG quality adjustable?
No — JPEG outputs use a fixed quality of 0.92.
Credits
- Canvas 2D API — Preset fitting (cover/contain/stretch) and export