Show HN: Create the right image sizes for social media
A new tool called 'social-media-image-sizes' helps users check and resize images to meet the specifications of 9 major social media platforms, supporting over 60 image formats. It includes scripts to validate image dimensions and automatically resize them according to platform-specific requirements. The tool integrates with npm and uses Sharp for image processing, offering options for cropping, fitting, and preserving safe zones.
- ▪The tool supports image sizing for 9 platforms including Instagram, Facebook, Twitter, and YouTube with over 60 specs.
- ▪Users can check an image's compatibility and receive suggested resize commands for each platform.
- ▪Resizing defaults to center-crop (cover), but letterboxing (contain) is supported with optional background color.
- ▪Critical safe zones are highlighted for platforms like Facebook and YouTube to ensure key content remains visible.
- ▪The tool requires Sharp, which may need configuration behind proxies using the SHARP_IGNORE_GLOBAL_LIBVIPS environment variable.
Opening excerpt (first ~120 words) tap to expand
skills/branding5/social-media-image-sizes/social-media-image-sizessocial-media-image-sizesInstallation$ npx skills add https://github.com/branding5/social-media-image-sizes --skill social-media-image-sizesSKILL.mdSocial Media Image Sizes Check and resize images for 9 platforms / 60+ specs. Scripts mirror the logic at branding5.com/tools/social-media-cheat-sheet. Setup Run once after install: cd <skill-dir> npm install Check an image node scripts/check.js photo.jpg Outputs a ranked match list — perfect → close → usable → too small — with an inline node scripts/resize.js command for every non-perfect match.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Skills.