Tools in this category
Which tool for which problem?
| Problem | Tool | What changes |
|---|---|---|
| PDF too big to attach | Compress a PDF | The file size; the page count stays the same |
| Photo too heavy, dimensions fine | Compress an image | The file size, and the format if you like (JPG, PNG, WebP) |
| Image too large in pixels | Resize an image | Width and height, and so the file size too |
Limits worth knowing first
To save space, PDF compression turns each page into an image. The text can no longer be selected or searched, and links, bookmarks and form fields are lost. With a PDF that is all text, the result can even be larger than the original; the tool tells you so and suggests keeping the file you started with.
For images, JPEG has no transparency, so transparent areas turn white. WebP keeps it and often gives a smaller file for photos. PNG is lossless and the browser cannot squeeze it further, so the saving mostly comes from reducing the dimensions.
Why nothing is uploaded
Your browser opens and rewrites the files itself, using Mozilla PDF.js for PDFs and the canvas element for images. A bank statement or a scanned passport never passes through a server, and a large file does not have to make the round trip.
Pixels, megabytes and email attachments, in numbers
A 4,000 × 3,000 pixel photo has 12 million pixels. Scaled down to 2,000 × 1,500, it has 3 million, a quarter as many. While working on it, the browser keeps four values per pixel (red, green, blue and transparency, according to the MDN documentation for ImageData), which means 48 MB of memory for the large photo and 12 MB for the small one. That is why it pays to reduce a photo's dimensions first.
For a sharp print, allow 2,480 × 3,508 pixels for A4 at 300 dpi and 1,181 × 1,772 pixels for a 10 × 15 cm print.
An email does not carry a file as it is: the RFC 2045 standard encodes it in base64, 4 characters for every 3 bytes. A 15 MB PDF therefore takes up about 20 MB once attached, enough to go over a size limit. Often it is enough to shrink a PDF before sending it or compress photos to JPG or WebP.