image

View Markdown
ittybit image \
  -i photo.png \
  -o photo.webp

Converts between image formats, resizes, or extracts a frame from video. Use this to generate thumbnails, convert to modern formats like WebP, or pull poster frames for video players.

Options

FlagValuesDefault
--formatjpeg · png · webp · avifper input
--qualityvery_low · low · medium · high · very_highauto
--widthpixels or "50%"same as input
--heightpixels or "50%"same as input
--fitcontain · cover · fill
--backgroundhex color (e.g. #000000)
--startseconds (frame extraction time)0

Examples

Extract a poster frame from video:

ittybit image \
  -i video.mp4 \
  -o poster.jpg \
  --start 5

Create a thumbnail:

ittybit image \
  -i photo.jpg \
  -o thumb.jpg \
  --width 320 \
  --quality medium

Convert to WebP:

ittybit image \
  -i photo.png \
  -o photo.webp

Output to S3:

ittybit image \
  -i s3://bucket/raw/photo.png \
  -o s3://bucket/thumbs/photo.webp \
  --connection my-s3 \
  --width 640

Local

Run locally using FFmpeg instead of cloud:

ittybit image \
  -i video.mp4 \
  -o poster.jpg \
  --local \
  --start 5 \
  --width 640

Requires FFmpeg installed. The file is processed on your machine.

See also