How to Compress Images for a Website or Upload Form
By Docmint Team · · 4 min read
Lower the quality to around 75 to 85 and cap the width to shrink images with no visible loss. Here is how to pick settings for websites and size limits.
To compress an image, re-save it at a lower quality setting and, if it is larger than it needs to be, reduce its dimensions. For most photos, a quality of 75 to 85 looks the same as the original while making the file much smaller. In Docmint's Compress Image, you drop in your images, move the quality slider, optionally set a maximum width or height, and check the estimated size before you download.
Why are image files so big?
Phone cameras produce photos that are often 4,000 pixels wide or more and several megabytes each, saved at high quality so they can be cropped and printed. A website rarely displays an image wider than about 2,000 pixels, and an upload form usually needs far less. The gap between what you have and what you need is the size you can remove.
Two levers do almost all the work. Dimensions control how many pixels there are: halving the width and height leaves a quarter of the pixels. Quality controls how aggressively a lossy format such as JPG or WebP discards detail the eye is unlikely to notice. Use both.
How to compress images with Docmint
- Open Compress Image and drop in one image or many.
- Move the quality slider. Start around 80 and adjust; the estimated new size updates live.
- Optionally set a maximum width or height so oversized photos are scaled down.
- Compare the before and after size and the preview.
- Click Compress and download. Several files come bundled in a ZIP.
What quality setting should you use?
For photos, 75 to 85 is the range where the result is usually indistinguishable from the original on screen. Well below that, you start to see blockiness in smooth areas like sky and skin, and halos around sharp edges and text. Above 90, files grow quickly for very little visible gain.
The right number depends on the picture. A busy photo with lots of texture hides compression well; a screenshot with text, a logo or a flat illustration shows artifacts sooner. Look at the preview closely, especially at edges and gradients, and settle on the lowest setting you are happy with.
How should you compress images for a website?
Images are often the heaviest part of a web page, so they are one of the best places to save. Limit width to roughly 1,600 to 2,000 pixels for full-width hero images, and much less for images shown in a column or as thumbnails. There is no benefit in sending a 4,000-pixel photo to a 700-pixel slot.
Format matters as much as quality. WebP gives the best balance of quality and size for the web and is supported by all current major browsers, while JPG remains the universal choice for photos. PNG is lossless, so the quality slider has little effect on it, and a photo saved as PNG can be several times larger than the same photo as JPG or WebP. If your photos are PNGs, convert them with Convert Image first, or chain Convert Image and Compress Image in a Docmint pipeline.
How do you get under an upload form's size limit?
Job applications, government portals and support forms often cap uploads at a few hundred kilobytes or a couple of megabytes. Work in this order: set a maximum width first, because a form that shows your photo small does not need thousands of pixels, then lower the quality until the estimated size is under the limit with a little room to spare.
If the form also asks for exact pixel dimensions, such as a 600 × 600 photo, use Resize Image to hit those numbers, then compress. Check which formats the form accepts; many take only JPG, so do not switch to WebP unless it is listed.
Does compressing an image remove its metadata?
Yes. Compress Image re-encodes the image from its pixels, so EXIF data such as the camera model and GPS location is not carried over. That trims the file a little further and is a sensible privacy step before posting photos publicly or sending them to people you do not know.
Common mistakes
- Compressing the same JPG again and again. Each lossy save loses a little more, so always start from the original.
- Expecting a PNG to shrink with the quality slider. Reduce its dimensions or convert it to WebP or JPG instead.
- Compressing a screenshot of text as hard as a photo. Text edges show artifacts first, so use a higher quality.
- Throwing away the originals. Keep full-size copies in case you need to print or crop later.
Other ways to compress images
Image editors, including the export options in macOS Preview, let you pick a quality when saving, and website build tools can compress images automatically. Those are good choices for a regular workflow. A browser tool is quickest for a one-off batch, and because nothing is uploaded, it suits personal photos and scanned documents.