Image compressor: WebP and AVIF
Drop images in and get WebP, AVIF, JPEG or PNG at the quality and size you need. Compare before and after with a slider, fit quality to a file size, build a responsive srcset set and download everything as one archive.
Free, no sign-up
Images are compressed on this device and never uploaded. Only settings are saved.
Compression runs in a background thread (Web Worker + OffscreenCanvas) — the page stays responsive.
How it works
Reading
A file is recognised by its signature, not its extension, and decoded by the browser (createImageBitmap) in a background thread. EXIF rotation is applied. SVG is rasterised through <img> at the needed width, GIF uses its first frame.
Resizing
The image fits inside the max width/height or fills the box with a centred crop; there is no upscaling. Downscaling goes in ×½ steps — a single pass with strong reduction produces jaggies and moiré.
Encoding
OffscreenCanvas in a Web Worker encodes to the chosen format and quality. If the browser cannot encode that format (canvas silently returns PNG), an honest fallback kicks in: AVIF → WebP → JPEG/PNG — and the file is marked.
Target size
In Target size mode quality is found by binary search: 7–9 encodes so the file fits the given kilobytes at the highest possible quality.
Compare and export
The before/after divider moves with a mouse, a finger or the arrow keys; 1:1 and 2:1 zoom reveal artefacts. Download one by one or everything as a ZIP; the responsive set gives copies and ready <picture> markup.
Formats and standards
WebP
- MIME
- image/webp
- Transparency
- yes
- Notes
- Lossy with transparency; 25–35% smaller than a JPEG that looks the same. Canvas encodes it in Chrome, Edge, Firefox; not Safari
AVIF
- MIME
- image/avif
- Transparency
- yes
- Notes
- Another 20–30% smaller than WebP, but canvas encodes it only in Safari 16.4+. In other browsers it falls back to WebP and says so
JPEG
- MIME
- image/jpeg
- Transparency
- no
- Notes
- No transparency (filled with the chosen background); readable everywhere
PNG
- MIME
- image/png
- Transparency
- yes
- Notes
- Lossless: quality does not apply; for UI screenshots and pixel art
- WebP is Google's format (RIFF container, VP8/VP8L compression), supported by all current browsers. AVIF is AV1 images in a HEIF container (ISO/IEC 23000-22), displayed by Chrome 85+, Firefox 93+, Safari 16.4+; encoding through canvas is Safari-only.
- Responsive set: widths 480, 768, 1280, 1920 px (never above the source), <picture> markup with <source type> and srcset w-descriptors per the HTML Living Standard. The sizes attribute tells the browser the image width in the layout — presets: 100vw · (max-width: 768px) 100vw, (max-width: 1280px) 90vw, 1200px · (max-width: 768px) 100vw, 50vw · (max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw.
- The <img> gets width and height (source proportions) so the browser reserves space and the layout does not jump (CLS in Core Web Vitals), plus loading="lazy" and decoding="async".
- The ZIP is built with fflate; already compressed images are stored without recompression (store mode), so the archive is ready instantly.
Browser support
- Chrome, Edge, Firefox: WebP, JPEG, PNG; AVIF falls back to WebP. Safari 16.4+: AVIF, JPEG, PNG; WebP falls back to JPEG/PNG. The tool checks the encoders on load and shows which are unavailable.
- The background thread needs OffscreenCanvas (Chrome 69+, Firefox 105+, Safari 16.4+). In older browsers compression runs on the main thread one image at a time — slower, but it works.
- HEIC/HEIF (iPhone photos) can only be read by Safari. In other browsers the tool says so honestly and explains how to get a JPEG.
- WebAssembly codecs (MozJPEG, libavif) are not used: the site's security policy forbids WebAssembly. Quality is what the browser's built-in encoder gives.
Limitations
- Files up to 60.0 MB, images up to 50 megapixels, up to 200 files at a time: everything lives in the tab's memory.
- Metadata is always removed — EXIF, GPS, ICC profile. Wide gamut (Display P3) is converted to sRGB.
- GIF/WebP animation is not kept: the first frame is used.
- Browser encoders are simpler than specialised ones (MozJPEG, finely tuned cwebp): at the same quality a file may be 5–15% larger than from your build pipeline.
- If the “compressed” file is larger than a same-size original, the original is kept by default — a label says so.
Privacy
- Images are not uploaded to a server: reading, resizing and encoding happen in this tab, and results are local blob: links.
- Only settings (format, quality, dimensions, background, set widths) are saved in localStorage. Images and results are not restored after a reload.
- Analytics receives only the fact of a compression or download and a category (format, “one/several files”) — no file names or content.
- The result reaches us only if you send a request yourself and keep the “Attach the result” box ticked — the form shows exactly what will be sent. Files and images are never sent with a request.
Related tools
All tools · 40
Link preview (Open Graph) checkerPaste HTML or fill in fields and see how a link looks in Telegram, WhatsApp, VK, Facebook, X, LinkedIn and Slack. Checks for og:image, text length and twitter:card, plus a ready <head> block.
JSON, YAML and CSV converterConvert between JSON, YAML and CSV with formatting, key sorting, syntax errors pinned to the exact spot, and a data tree.
Regex testerMatches and groups highlighted as you type, replace, a step-by-step breakdown of the pattern, a library of ready patterns and freeze protection.
Cron expression helperA cron expression ↔ plain language, the next runs in your time zone, a schedule builder and variants for Linux, Quartz, GitHub Actions and Kubernetes.
Base64, hashes, UUID and ULIDBase64/base64url, Base32, HEX, URL and HTML both ways, hashes of text and files of any size (SHA-256, SHA-3, BLAKE3, MD5, CRC-32), HMAC, checksum verification, generating and inspecting UUID v4/v7, ULID and NanoID.Is your site slow because of images?
InterLAB builds fast sites: responsive images, modern formats, lazy loading and Core Web Vitals in the green. The first conversation is free.
- The first short conversation is free — we choose the format
- NDA — yours or ours
- Pricing after a brief and an agreed scope