# What actually happens to your photo.

> What actually happens when you compress, resize or strip metadata from a photo in the browser — the codecs, the limits, and what EXIF removal deletes.

Canonical: https://stayslocal.app/how-it-works/image
Last updated: 2026-08-16

Compressing, resizing or cleaning up a photo usually means uploading it somewhere first. Here it does not. Here is the actual mechanism — decode, edit, re-encode — and what it guarantees.

## Decoding, editing, re-encoding — with no upload step

A file you choose is read from disk with the File API, decoded into a Canvas or an OffscreenCanvas inside a Web Worker, and re-encoded either by the browser's own image encoder or by a WebAssembly codec compiled directly into the page. @jsquash/webp handles WebP everywhere, because Safari still cannot produce WebP from canvas.toBlob — a real gap in the standard, not an oversight here.

Resizing uses a Lanczos resampling kernel rather than the browser's default nearest-neighbour or bilinear scaling, which is why a downscaled image here does not come out visibly softer than the source deserves.

## What EXIF removal actually deletes

A photograph carries more than the picture: a phone writes GPS latitude and longitude, a capture timestamp, the device make and model, and often a lens serial number into the file's EXIF block. The EXIF Viewer & Remover strips this without touching the pixels at all.

The mechanism is byte-level, not a re-encode: the JPEG's APP1 and COM marker segments are dropped while the entropy-coded scan data is copied through unchanged. The result is bit-identical to the source image and the ICC colour profile survives — this is the one image tool that does not decode and re-encode, because there is no reason to touch pixels to delete metadata sitting in a separate part of the file.

## Getting good compression without visible loss

A few things determine whether a smaller file still looks right at the size you are viewing it.

- Quality is not linear: dropping from 90 to 80 usually costs little, dropping from 40 to 30 usually costs a lot. Compare at the size you will actually display the image, not at 100% zoom.
- WebP typically beats JPEG at the same visual quality, but check compatibility if the image needs to work in an older tool that only reads JPG or PNG.
- Batches are processed strictly one image at a time, decode → encode → release → next, to keep peak memory to roughly one image regardless of how many are queued.
- iOS caps canvas area at about 16.7 megapixels — 4096×4096 on older devices — so a very large photo is clamped rather than silently coming out blank.

## Why this runs in your browser

None of this needs a server: decoding, resampling and re-encoding are all things a browser already does natively or can do with a WebAssembly codec loaded once into the page. Uploading a photo to do it anyway means handing over whatever the file's own metadata discloses — including exactly where it was taken — to a site whose retention policy you have not read.

You can verify the claim rather than take it on faith: open your browser's network inspector, run any image tool, and watch that no request carries the file.

## Try it: Image Tools

- [Image Compressor](https://stayslocal.app/image/image-compressor): Shrink a photo without visible loss
- [Batch Optimizer](https://stayslocal.app/image/batch-image-optimizer): Compress many images and download a ZIP
- [Image Resizer](https://stayslocal.app/image/image-resizer): Resize with high-quality resampling
- [Crop, Rotate & Flip](https://stayslocal.app/image/crop-rotate-flip-image): Trim, turn and mirror an image
- [Convert to WebP](https://stayslocal.app/image/convert-image-to-webp): JPG and PNG to WebP
- [WebP to JPG or PNG](https://stayslocal.app/image/convert-webp-to-jpg-png): Convert WebP for tools that refuse it
- [JPG ↔ PNG](https://stayslocal.app/image/convert-jpg-to-png): Convert between JPG and PNG
- [SVG to PNG](https://stayslocal.app/image/convert-svg-to-png): Rasterize SVG at any scale
- [EXIF Viewer & Remover](https://stayslocal.app/image/exif-viewer-remover): See and strip photo metadata, including GPS
- [Add Watermark](https://stayslocal.app/image/add-watermark-to-image): Overlay text on an image
- [Color Palette Extractor](https://stayslocal.app/image/extract-color-palette): Pull the dominant colours from an image
- [Favicon Generator](https://stayslocal.app/image/favicon-generator): A full favicon set from one image
- [Image ↔ Base64](https://stayslocal.app/image/image-to-base64): Encode an image to a data URI, or decode one back

## Other families

- [How QR works](https://stayslocal.app/how-it-works/qr)
- [How PDF works](https://stayslocal.app/how-it-works/pdf)
- [How Note works](https://stayslocal.app/how-it-works/note)
- [How Dev works](https://stayslocal.app/how-it-works/dev)
