Quick answer: Start with the original format and quality around 80. Resize only if the image will be displayed smaller. Choose WebP when you want a smaller modern file with transparency, JPEG for photographs without transparency, and PNG for screenshots, graphics, or lossless output. Then compare the result before replacing the original.

What image compression actually does

Image compression re-encodes pixel data so the file uses fewer bytes. Lossy codecs such as JPEG and WebP discard some detail to reduce size; lossless codecs such as PNG preserve the pixels exactly. Every compression decision is a trade-off between file size, visual quality, and compatibility.

The result depends on more than the quality slider. Pixel dimensions, image content, format, encoder, transparency, and metadata all affect the final byte size. A photograph with fine detail may need a higher quality setting than a simple graphic, and an image that is already optimized may not get smaller at all.

PixelShrink uses the browser's Canvas encoder. It is not a replacement for server-side tools such as mozjpeg, oxipng, or AVIF encoders, and it may produce different results. Its advantage is that the file stays on your device.

Which image format should you choose?

Common image formats and how PixelShrink handles them
Format Best for Transparency PixelShrink behaviour
JPEG Photographs and complex images No Lossy; quality applies; transparent areas become white
PNG Screenshots, graphics, lossless output Yes Lossless; the quality slider does not apply
WebP Modern web photos and graphics Yes Quality applies; transparency is preserved
GIF Simple animation input Limited First frame only; saved as PNG by default

With Same as source, PixelShrink keeps JPEG, PNG, and WebP output and converts GIF to PNG. If the browser cannot encode a requested format, the interface labels the actual format that was written.

Use SVG for logos and icons, not photographs. SVG is resolution-independent, but PixelShrink does not accept it because it is a different kind of image format and can contain active content.

How to choose quality and size

The quality slider runs from 10 to 100 and applies to JPEG and WebP. Lower values make smaller files and can introduce visible artifacts; higher values keep more detail and produce larger files. PNG output is lossless, so the slider is ignored.

Starting points for JPEG and WebP quality
Quality Typical use
60–70Small thumbnails, previews, and images where some softening is acceptable
75–85General web photographs; 80 is the default
90–100High-quality copies where size savings matter less
AnyPNG output; the value is ignored because the format is lossless

Resizing is often the larger win. An image displayed at 800 pixels wide does not need a 4000-pixel source. PixelShrink can use 75%, 50%, or custom dimensions, never enlarges an image, and treats custom width and height as a bounding box that preserves the aspect ratio.

Always inspect the result at its intended display size. A file that looks fine at thumbnail size may show artifacts on a large screen.

Does compression reduce image quality?

Lossy compression can reduce visual quality; lossless compression does not discard pixels. JPEG and WebP output can show blocking, ringing, or lost fine detail as the quality setting drops. PNG output is lossless, but re-encoding a PNG can still change file size and metadata.

There is no universal “no quality loss” guarantee across all formats and settings. The honest approach is to choose the smallest file that still looks acceptable for its purpose. For photographs, quality 80 is a reasonable starting point; for text-heavy screenshots, PNG is usually the safer choice.

Transparency is another format constraint. JPEG cannot store it, so transparent areas become white. GIF input is reduced to its first frame. If re-encoding would make a same-format, unresized image larger, PixelShrink keeps the original bytes and labels the row original kept.

Local vs. upload-based compression

A conventional online compressor receives your file on its server, processes it, and sends the result back. That can be convenient, but it means a copy of the image reaches another machine.

PixelShrink reads the file with the browser's File API and renders it to a local Canvas. The result is encoded in the tab and offered as a download. Images are not sent to a server, and the page has no analytics, advertising, or third-party scripts.

Local processing has limits. Your device's memory, CPU, and browser canvas size determine what can be processed. Very large images may be scaled down to fit browser limits, and the result dimensions are shown in the queue. Hosting providers may still process standard request logs for the page itself; the privacy policy describes that distinction.

Image compression and page speed

Large images cost bandwidth, decode time, and memory. They can delay the largest contentful paint (LCP) and make a page feel slow, especially on mobile connections. Compressing images is one part of image performance; serving them at appropriate dimensions and formats is another.

Useful follow-up steps include responsive srcset images, modern formats with fallbacks, sensible cache headers, and lazy loading for offscreen images. Compression does not guarantee a better search ranking by itself. Search engines care about the resulting user experience, not a single file-size number.

See web.dev: Image optimization and web.dev: Core Web Vitals for the underlying guidance.

How to compress an image with PixelShrink

  1. Add images. Drop files onto the page, paste an image from the clipboard, or browse for JPEG, PNG, WebP, and GIF files. Files are read locally.
  2. Choose settings. Start with Same as source, quality 80, and original size. Choose WebP or JPEG if you need a smaller file, PNG if you need lossless output or transparency, and a smaller size if the image will be displayed smaller.
  3. Compress. Select Compress and watch the progress indicator. You can cancel after the current image finishes.
  4. Review and download. Check the result dimensions, format, size, and savings. Download one image or a ZIP. If a row says original kept, the original was already smaller than the re-encoded result.

Open the PixelShrink compressor

Frequently asked questions

Is it safe to compress images online?

It depends on the tool. Upload-based compressors send your image to their servers. PixelShrink processes the file in your browser with the File API and Canvas, so the image never leaves your device. If you use another tool, check whether it uploads files and read its privacy policy.

Does compressing an image reduce its resolution?

Not by default. Quality settings change how the encoder stores the image, not its pixel dimensions. Resolution only changes if you resize the image. PixelShrink keeps the original dimensions unless you choose 75%, 50%, or a custom size, and it never enlarges an image.

What quality setting should I use?

Start around 80 for photographs. Use roughly 60 to 75 for small previews or thumbnails, and 90 to 100 when quality matters more than file size. These are starting points, not rules: inspect the result at its intended display size and compare it with the original.

What is the best image format for photos?

JPEG and WebP are usually the best choices for photographs. WebP often produces a smaller file and supports transparency, while JPEG has universal support. Use PNG for screenshots, graphics, or images that need lossless output, and do not use GIF for still photographs.

Why did my compressed file get larger?

Re-encoding an image can add bytes, especially if the original was already optimized or if you switch to a less suitable format. Canvas output can also differ from dedicated command-line encoders. When no resize or format change is requested and the result is larger, PixelShrink keeps the original and labels the row original kept.

Can I compress an animated GIF?

PixelShrink reads the first frame of a GIF and saves it as a still PNG by default. Animation is not preserved. If motion matters, use a video or animation-specific tool instead.

Is PixelShrink free?

Yes. There are no ads, accounts, tracking scripts, or paid tiers. The source code is MIT licensed and available on GitHub.

Sources and further reading

This guide is maintained by the PixelShrink project. It has no sponsored or affiliate links. The application source is on GitHub.

Suggested citation: PixelShrink. “How to compress images without uploading them.” compress-image.uk/guide.html. Updated 1 November 2026.