Scale all jpeg images in a directory to optimal Instagram size, adding white bars if needed to get an acceptable aspect ratio.
Images on Instaram are best sized to 1080 pixels wide and between 566 and 1350 pixels high (aspect ratio between 1.91:1 and 4:5)1.
This script will take all the jpeg files in the current directory and create scaled copies in an Instagram subdirectory (the directory will be created if needed). White bars will be added top and bottom or to the sides to make sure the copied image has an aspect ratio that fit the Instagram limitations.
Imagemagick2 version 7 must be installed and the magick
command must be in the PATH
Copy instascale.sh
into a directory on you PATH
, e.g. $HOME/bin
cd
to the directory with the jpeg files that need resizing- run
instascale.sh
- check the
Instagram
folder for modified jpeg files