ImageSlim resizes and encodes a selected image inside your browser. This walkthrough uses the actual tool, a downloadable synthetic image, and explicit settings so you can repeat the conversion and inspect the result. It separates resizing from compression: making an image smaller in pixels can save more bytes than changing its file format.
What the tool actually does
The current ImageSlim implementation reads the selected file with FileReader.readAsDataURL(), decodes it into an Image, draws it to a canvas at your chosen dimensions, and exports it using canvas.toDataURL(format, quality). JPEG export fills transparent areas with white. The processing code does not upload the selected image.
The app requests high-quality image smoothing. That is a browser hint, not a promise of a particular bicubic resampling algorithm. Export support also varies: PNG is the baseline Canvas format, while JPEG and WebP depend on the browser. AVIF decoding support does not establish Canvas AVIF encoding support.
Repeat our measured conversion
- Download the original PNG test image. It is a 640 × 400 generated pattern with mild noise, a rectangle, and a circle; it contains no personal image data.
- Open ImageSlim and select the downloaded file.
- Choose pixels, keep aspect ratio enabled, and set width to 320. Height should become 200.
- Select WebP, set quality to 80%, then process and download the image.
- Compare the saved file size and dimensions with the reference below. Inspect edges and textured areas before deciding whether the quality suits your use.
| Setting | Original | Output |
|---|---|---|
| Format | PNG | WebP, quality 80% |
| Dimensions | 640 × 400 | 320 × 200 |
| File size | 252,215 bytes | 3,624 bytes |
| Byte reduction | — | 98.6% |
This is one synthetic test, not a typical savings promise or a comparison of codecs at equal resolution. Both dimensions were halved, reducing pixel count to one quarter, and a lossless PNG became a lossy WebP. Photographs, logos, existing JPEGs, and browser encoder versions can produce very different results. Keep 640 × 400 in a second run if you want to isolate format and quality changes.
Read the result correctly
The byte reduction is (1 - outputBytes / inputBytes) × 100. A smaller output is useful only when its resolution and quality still meet your needs. For screenshots with small text, compare legibility at 100% zoom. For logos with transparency, check the background. An already optimized source can become larger after conversion.
The tool's quality slider applies to formats with lossy quality controls; it does not turn PNG into a lossy format. A filename extension alone does not prove the output format. Unsupported Canvas export formats can fall back to PNG, so check the MIME type or open the downloaded file with an image inspector.
Practical limits and file privacy
A decoded 48-megapixel RGBA image needs roughly 192 million bytes before additional canvas buffers and encoded strings. Large inputs can therefore exhaust memory on a phone. ImageSlim currently uses data URLs, which add string overhead; a Blob-based implementation is an alternative for larger workloads, not a feature this walkthrough claims the tool already uses.
Local file processing and website analytics are separate. ImageSlim's image operation reads and encodes the selected file locally; page assets and analytics can still make network requests. Follow our browser privacy walkthrough to inspect requests using the synthetic sample.