# Image Compressor & Converter

> Compress and resize images and convert them to WebP, JPEG, PNG or AVIF in your browser. Removes GPS position and camera data and shows what was found.

- Page: https://notadevblog.com/en/tools/media/image-converter/
- German version: https://notadevblog.com/de/tools/media/image-converter.md
- Category: Images & QR

## At a glance

- **Processing:** Locally in your browser, also offline once the page has been opened. Input never leaves your device.
- **Formats:** To WebP, JPEG, PNG or AVIF with your browser’s encoders; resize keeps the aspect ratio
- **Metadata:** Shows and removes Exif (GPS, camera, date), XMP, IPTC and comments; Exif can be kept in JPEG

## For agents

WebMCP: the page registers these functions via document.modelContext in browsers that support it.
ES module: https://notadevblog.com/core/image-converter.js
Every function returns { "ok": true, ... } or { "ok": false, "error": { "code", "message" } }.

### image_convert

Re-encodes images with the browser’s own encoders: format webp, jpeg, png or avif (avif and sometimes webp are not supported by every browser: then the call fails with format_unsupported instead of returning another format). quality 0-1 (default 0.8, ignored for png). maxWidth / maxHeight shrink the image to fit, keeping the aspect ratio; images are never enlarged, and very large ones are shrunk to 16.7 megapixels (canvas limit, note canvas_limit). The Exif orientation is applied, so photos come out upright. stripMetadata (default true) removes Exif (camera, GPS position, date), XMP, IPTC and comments; meta lists what the input contained. With stripMetadata false, Exif is copied into jpeg output only (note metadata_kept, otherwise metadata_lost). Transparent areas become background (default #ffffff) in jpeg. Animated GIF, WebP or PNG: only the first frame (note animated_first_frame). If the result is larger than the input and has the same format and size, the original is returned (note kept_original); otherwise note larger_than_original. Input: files as data: URLs, at most 10485760 bytes in total. Output items carry dataUrl. Works in a browser only; elsewhere the error is no_canvas.

Parameters:
- files (array, required)
- format (string: webp | jpeg | png | avif, required)
- quality (number, default 0.8, 0..1)
- maxWidth (integer, 1..32767)
- maxHeight (integer, 1..32767)
- stripMetadata (boolean, default true)
- background (string, default "#ffffff")

## How to use

1. **Add images:** Drop images onto the area or choose files. JPEG, PNG, WebP, GIF, AVIF and other formats your browser can open work.
2. **Choose format and size:** Pick the target format, the quality and, if you like, a maximum width or height. Lower quality means smaller files.
3. **Download:** Each row shows the new size and how much was saved. Download single images or all at once.

## About this tool

Photos from phones are often several megabytes and carry the place where they were taken. For a website or an email a smaller file without that data is usually better.

Your browser decodes and encodes the images itself. The quality depends on its built-in encoders.

## Frequently asked questions

### Which format should I choose?

WebP for websites: small files, transparency, supported by all current browsers. JPEG where WebP is not accepted. PNG for screenshots and graphics with sharp edges, without loss. AVIF is smallest but not every browser can create it.

### Which metadata is removed?

Exif data such as GPS position, camera, lens and date, plus XMP, IPTC and comments. The tool lists what each image contained before you download it.

### Why is the result sometimes larger?

An image that is already well compressed can grow when it is saved again, for example a small PNG converted to JPEG at high quality. If format and size stay the same, the tool keeps the original.

### What happens to transparency and animations?

JPEG has no transparency, so transparent areas get the background color you choose. Animated GIF and WebP files keep only their first frame.
