The problem with server-based image compression.
When you use a tool like TinyPNG, iLoveIMG, or Compressor dot io, your images are uploaded to their servers. The compression happens on their infrastructure, and the result is sent back to your browser for download. This round trip introduces three categories of problems.
Privacy risk. Your images temporarily exist on a third-party server. For personal photos, client work, medical images, legal documents, or any sensitive content, this is a real risk. Even if the service claims to delete files after processing, you are trusting their infrastructure, their employees, their data retention policies, and their ability to prevent breaches. According to IBM's 2025 Cost of a Data Breach Report, the average data breach costs 4.88 million dollars.
Speed bottleneck. Uploading a batch of 20 images at 3 megabytes each means transferring 60 megabytes upstream. On a typical home connection with 10 megabits per second upload speed, that is roughly 48 seconds just for the upload, before any compression even starts. Then the results need to be downloaded. With browser-based compression, the same batch processes in 5 to 15 seconds with zero network transfer.
Artificial limits. Server-based tools impose limits because processing costs them money. TinyPNG allows 500 free compressions per month. iLoveIMG limits batch size to 15 files. These restrictions exist purely because of server costs, not because of any technical limitation in image compression itself.
How browser-based image compression works.
Modern web browsers are powerful enough to compress images locally without sending them anywhere. This is not a compromise. It is how image compression should work. The technology stack involves three layers.
Layer 1: The Canvas API. The HTML5 Canvas API provides a toBlob method that can encode image data into JPEG, PNG, or WebP format at a specified quality level. When you load an image onto a canvas and export it at quality 0.8, the browser's native image encoder handles the compression. This is the same encoder the browser uses to render web pages, so it is highly optimized.
Layer 2: The browser-image-compression library. Libraries like browser-image-compression, used by SammaPix, build on the Canvas API to add intelligent features: target file size optimization, progressive quality reduction, EXIF preservation options, and Web Worker support for non-blocking compression.
Layer 3: OffscreenCanvas and Web Workers. The OffscreenCanvas API allows canvas operations to run in a Web Worker thread, separate from the main UI thread. This means image compression can happen in the background while you continue interacting with the page. Chrome, Firefox, and Edge all support OffscreenCanvas, with Safari adding support in Safari 16.4.
Quality comparison: browser versus server. A common misconception is that server-side compression is significantly better. In reality, modern browser engines are highly optimized. Browser-based tools achieve compression ratios within 5 to 10 percent of server-side tools like MozJPEG or libvips. The difference is imperceptible in virtually all web use cases.
Tool comparison: TinyPNG versus Squoosh versus iLoveIMG versus SammaPix.
TinyPNG uses server-side processing, handles up to 20 files per batch, limits to 500 images per month, and has a 5 megabyte file size limit. Your files are uploaded to their servers. Quality is automatic with no manual control.
Squoosh is browser-based and fully private, but processes only one file at a time with no batch support. It offers excellent manual quality control with multiple output formats including AVIF.
iLoveIMG uses server-side processing, handles up to 15 files per batch, with limited monthly batches. Your files are uploaded to their servers. Quality is automatic only.
SammaPix is browser-based and fully private. It handles 20 files per batch on the free tier and 500 on Pro. File size limit is 20 megabytes free, 50 megabytes Pro. It offers a full manual quality slider with JPEG, PNG, and WebP output. It includes 27 additional tools beyond compression.
The key takeaway: Squoosh and SammaPix are the only fully browser-based options. Squoosh processes one image at a time, which makes it impractical for batch workflows. SammaPix processes up to 20 images at once on the free tier.
Why no-signup matters more than you think.
Requiring an account for image compression is a dark pattern. Image compression is a CPU operation that can happen entirely in your browser. There is no technical need for a server, an account, or even an internet connection once the page has loaded.
Tools that require signup do so for business reasons: to collect your email for marketing, to enforce usage tiers that push you toward paid plans, and to track your usage patterns. None of this is necessary for the core functionality of compressing an image.
When evaluating image compression tools, consider the friction-to-value ratio. The best tools deliver value with the least friction. Browser-based tools inherently win on every friction dimension because the processing is free for the tool provider.
This also applies to GDPR and privacy regulations. Under the GDPR, uploading images to a server constitutes data processing and requires legal basis, a privacy policy, and potentially a data processing agreement. Browser-based tools that never transmit your files sidestep this entirely.
The weight of images on the modern web.
According to the HTTP Archive's 2025 Web Almanac, the median web page weighs approximately 2.5 megabytes on desktop and 2.2 megabytes on mobile. Images account for roughly 50 percent of that total page weight, making them the single largest component of most web pages.
28 percent of image bytes could be saved by serving images at their actual display dimensions. An additional 20 percent could be saved by converting to modern formats like WebP. The average page includes 30 image requests, many of which are uncompressed or minimally compressed.
This is why batch compression matters. If you are managing a website with hundreds of images, compressing them one at a time is impractical. A batch tool that processes 20 images in a single operation makes the optimization workflow viable.
How to batch compress images in your browser.
Step 1: Open SammaPix Compress in your browser. No account, no download, no installation.
Step 2: Drag and drop up to 20 images at once. Supports JPEG, PNG, WebP, GIF, AVIF, and HEIC.
Step 3: Set your quality level. 80 is the sweet spot for web use. It delivers 50 to 80 percent file size reduction with no visible quality difference.
Step 4: Watch the compression happen in real time. Each file shows its original size, compressed size, and percentage saved.
Step 5: Download each image individually or all at once as a ZIP on Pro.
The entire process happens in your browser. If you open your browser's network inspector during compression, you will see zero outbound requests.
When server-side compression is the better choice.
Being honest about trade-offs: there are cases where server-side compression genuinely makes more sense.
Automated pipelines. If you need to compress thousands of images automatically as part of a build process or CMS workflow, an API-based service like TinyPNG's API, Cloudinary, or imgix is the right tool. Browser-based tools require manual interaction.
Maximum compression with MozJPEG or AVIF. Server-side tools can use advanced codecs like MozJPEG for 5 to 10 percent better JPEG compression, or AVIF encoding which is computationally expensive. For the absolute maximum compression at the highest quality, server tools have a small edge. For 95 percent of use cases, the browser result is indistinguishable.
WordPress and CMS plugins. If you run a WordPress site, plugins like ShortPixel or Imagify automatically compress images when you upload them. This is convenient because it requires zero manual effort.
Combining compression with other image operations.
Compression alone is rarely enough. The optimal image workflow for web content involves multiple steps.
Resize first, then compress. A 4000 pixel image resized to 1200 pixels before compression saves significantly more than compression alone.
Convert to WebP. WebP is 25 to 34 percent smaller than JPEG at equivalent visual quality, with 97 percent browser support.
Strip EXIF metadata. EXIF data like GPS coordinates, camera model, and timestamps adds 10 to 100 kilobytes per image and is a privacy risk.
Rename for SEO. Files named IMG underscore 4521 dot jpg contribute nothing to search rankings. AI-generated descriptive names improve image SEO.
The combined effect of resize plus format conversion plus compression can reduce a batch of images from 100 megabytes to under 5 megabytes with no visible quality loss.
Batch compression on mobile devices.
One of the biggest advantages of browser-based compression is that it works on any device with a modern browser, including phones and tablets. There is no app to install. You open the tool in Safari or Chrome, select your photos, and they are compressed locally.
This is particularly useful for iPhone users. iPhones shoot in HEIC format by default, which is not universally supported. You can convert HEIC to JPEG or WebP, then compress the result, all on your phone, all in the browser.
Performance on mobile is solid. A modern iPhone or mid-range Android phone with 6 gigabytes of RAM can compress a batch of 20 images in 10 to 20 seconds. Even on older devices, the process completes within a minute for a full batch.
Originally published at sammapix.com
Try it free: SammaPix — 27 browser-based image tools. Compress, resize, convert, remove background, and more. Everything runs in your browser, nothing uploaded.
Top comments (0)