Skip to content

CLI

One-shot commands over the same pipeline, no server:

Terminal window
oximg resize photo.jpg 1600 1600 out.webp # fit within 1600x1600; format from the extension
oximg resize photo.jpg 800 800 out.jpg -q 70 # JPEG quality 70 (--preset fast|small for mozjpeg)
oximg resize photo.jpg 750 0 out.jpg # width-only: height follows the aspect ratio
oximg resize photo.jpg 0 0 out.webp # 0 0 = re-encode at the source's own size
oximg probe photo.webp # format + stored dimensions, header-only
oximg probe loop.gif # animated sources also print frames, duration and loop count

The output format is -f/--format, else the <out> extension, else the source’s own format — the same precedence idea as the server’s @fmt grammar. The OXIMG_* encode knobs below apply to CLI encodes the same way. Usage errors exit 2; processing failures exit 1.