PNG · JPEG · GIF · WebP · AVIF online compression

Smart image compression — free

Compress PNG, JPEG, GIF, WebP and AVIF images online — animations stay animated, static images convert between formats, and PNG or JPEG upscale 2× or 4×. Results that can't get smaller are never charged. Free, with one quota across web, API and CLI.

Three requests to wire it into your pipeline

curl -X POST https://lubanpng.wizthink.cn/v1/images/compress \
  -H "Authorization: Bearer lp_live_…" \
  -F "file=@photo.png"

{ "code": 0, "msg": "success", "data": { "task_id": "550e8400-…" } }

Sign up for 50 runs a month — shared between web and API.

View the API docs

Also upscales PNG / JPEG 2× / 4× →

A whole directory, one command

npm i -g lubanpng

Node 24+, macOS / Linux / Windows.

$ lubanpng login
$ lubanpng compress ./images --out ./dist

  photo_banner.jpg   2.40 MB → 0.89 MB   -63%
  logo@2x.png         312 KB →   96 KB   -69%
  2 images, saved 1.72 MB, 46 runs left this month
  • PNG, JPEG, GIF, WebP and AVIF
  • Signing up gives you 50 runs a month, shared across the web app, API and CLI.
  • x2 or x4; the output is always PNG