vipsthumbnail1
Make thumbnails of image files
Usage
vipsthumbnail [flags]
imagefile1
imagefile2 ...
Overview
vipsthumbnail(1) processes each imagefile in turn, shrinking each image to fit within a 128 by 128 pixel square. The shrunk image is written to a new file named tn_imagefile.jpg. This program is typically faster and uses less memory than other image thumbnail programs.
For example:
$ vipsthumbnail fred.png jim.tif
will read image files fred.png and jim.tif and write thumbnails to the files tn_fred.jpg and tn_jim.jpg.
$ vipsthumbnail --size=64 -o thumbnails/%s.png fred.jpg
will read image file fred.jpg and write a 64 x 64 pixel thumbnail to the file thumbnails/fred.png.
Options
-
-s N, --size=N -
Set the output thumbnail size to N x N pixels.
You can use "MxN" to specify a rectangular bounding box. The image is shrunk so that it just fits within this area, images which are smaller than this are expanded.
Use "xN" or "Mx" to just resize on one axis.
Append "<" to only resize if the input image is smaller than the target, append ">" to only resize if the input image is larger than the target.
-
--path=FORMAT -
Set the output path format. Three substitutions are performed:
%sis replaced by the input basename with any suffix removed,%dis replaced by the input dirname, and%cis replaced by the current working directory.The default value is
%d/tn_%s.jpgmeaning JPEG output, to the same directory as the input file, withtn_prepended. You can add format options too, for example%c/%s/tn_%s.jpg[Q=20]will write JPEG images to a tree within the current directory with Q set to 20.
-
-e PROFILE, --eprofile=PROFILE -
Export thumbnails with this ICC profile. Images are only colour-transformed if there is both an output and an input profile available. The input profile can either be embedded in the input image or supplied with the
--iprofileoption.
-
-i PROFILE, --iprofile=PROFILE -
Import images with this ICC profile, if no profile is embedded in the image. Images are only colour-transformed if there is both an output and an input profile available. The output profile should be supplied with the
--oprofileoption.
-
-c, --crop -
Crop the output image down. The image is shrunk so as to completely fill the bounding box in both axes, then any excess is cropped off.
-
-d, --delete -
Delete the output profile from the image. This can save a small amount of space.
-
-t, --rotate -
Auto-rotate images using EXIF orientation tags.
-
-a, --linear -
Shrink images in linear light colour space. This can be much slower.
Return value
returns 0 on success and non-zero on error. Error can mean one or more conversions failed.
Releases
8 releases since Debian 7 (Wheezy); the text changed 5 times.
--crop since Debian 8 (Jessie);
--delete since Debian 8 (Jessie);
--linear since Debian 10 (Buster);
--path since Arch Linux 2026-11-01;
--rotate since Debian 10 (Buster);
-a since Debian 10 (Buster);
-c since Debian 8 (Jessie);
-d since Debian 8 (Jessie);
-t since Debian 10 (Buster).
--format until Debian 9 (Stretch);
--interpolator until Debian 9 (Stretch);
--nodelete until Debian 7 (Wheezy);
--nosharpen until Debian 7 (Wheezy);
--output until Debian 13 (Trixie);
--sharpen until Debian 9 (Stretch);
--verbose until Debian 9 (Stretch);
-f until Debian 9 (Stretch);
-l until Debian 7 (Wheezy);
-n until Debian 7 (Wheezy);
-o until Debian 13 (Trixie);
-p until Debian 9 (Stretch);
-r until Debian 9 (Stretch);
-v until Debian 9 (Stretch).