Compress images in place, right from your editor.
Lossy, TinyPNG-class image compression — without the round-trip. Right-click an image in the Explorer and it’s re-encoded on the spot. Everything runs locally; your images never leave your machine.
See it in action
What it does
Six formats
JPEG, PNG, WebP, AVIF, TIFF, and GIF — mozjpeg for JPEG, libimagequant palette quantization for PNG, plus modern WebP and AVIF.
Right from the Explorer
Right-click an image, a multi-selection, or a whole folder. Folders recurse and optimize every supported image inside.
Live quality preview
A quality slider with a side-by-side before/after and real-time size and savings — re-encoded as you drag.
Smart skip rules
Keep the original when there’s no size win, or only overwrite when savings clear a threshold you set.
Optimize As…Coming soon
Re-encode a single image to a new name or a different format, bypassing the skip rules when you ask for it explicitly.
100% local
Images never leave your machine — no upload, no service, no round-trip. The encoder runs in-process via sharp.
Install & use
1. Install
Install directly from the VS Code Marketplace.
Or install from the CLI:
Prefer manual install? Grab the latest .vsix from GitHub Releases and choose Extensions → Install from VSIX…
2. Run a command
Right-click in the Explorer, or open the Command Palette:
Optimize Image — re-encode & overwrite in place (file, selection, or folder)
Optimize Image: Preview — open the quality slider before saving
Optimize Image As… — re-encode to a new name or format3. Tune it (settings.json)
Per-format quality and skip rules:
{
"imageOptimizer.jpegQuality": 80,
"imageOptimizer.pngQuality": 80,
"imageOptimizer.webpQuality": 80,
"imageOptimizer.skipIfLargerOrEqual": true,
"imageOptimizer.minSavingsPercent": 0,
"imageOptimizer.notificationSeconds": 5
}How it works
In the editor the encoder is sharp: mozjpeg for JPEG, libimagequant palette quantization for PNG (the lossy step that gives TinyPNG-class savings), plus WebP, AVIF, TIFF and GIF.
It runs in-process, so files are re-encoded locally and overwritten in place — no service, no upload.