The format question gets most of the attention, but it is the second decision, not the first. A photo straight off a phone is often six times more pixels than the page will ever show. Fix the size, then pick the format, and the format choice turns out to be simple.
The decision rule
- A photo on your own site: WebP. If the platform you publish on does not accept WebP, JPG.
- A screenshot, a chart, a diagram, a logo, anything with sharp text or flat color: PNG, or lossless WebP when it comes out smaller.
- Anything that needs a transparent background: PNG or WebP. JPG cannot store transparency at all.
- A file you are sending to someone else or uploading to a form: JPG. It opens everywhere, and some forms and older editing programs still refuse WebP.
That covers nearly every case. The rest of this explains why, and how to get there without guessing.
What each format is good at
JPG
JPG throws away detail the eye does not easily notice, which is why photos shrink so well in it. The cost shows up on hard edges: around text and thin lines it leaves faint smudges, and every time a JPG is edited and saved again it loses a little more. Use it for photographs and for files that have to open anywhere.
PNG
PNG keeps every pixel exactly. That makes it right for screenshots, interface images and logos, where a smudge around a letter is obvious. It is the wrong choice for photos: a photograph saved as PNG is usually several times the size of a good JPG of the same picture, with no difference anyone can see.
WebP
WebP does both jobs. In lossy mode it behaves like JPG and usually produces a smaller file at a similar look; in lossless mode it keeps every pixel like PNG. It supports transparency in both modes, and every current major web browser displays it. The catch is outside the web page: some upload forms, email programs and older desktop software do not accept it.
A common doubt is whether WebP is always smaller. It is not. A converted file can come out larger than the original, especially when the source was already a well-compressed JPG. The only reliable answer is to convert and compare the two sizes, which is why it helps to use a converter that shows both.
Get the pixel size right first
Work out how wide the image will actually appear on the page, then double it so it stays sharp on high-density screens such as phones and most laptops. An image in an 800-pixel content column needs to be 1,600 pixels wide. Anything beyond that is downloaded by every visitor and then thrown away by the screen.
A 12-megapixel phone photo is 4032 x 3024 pixels, about 12.2 million pixels. Resized to 1600 x 1200 it has 1.92 million. That single step removes 84% of the pixels before any format or quality setting has been touched, and the file shrinks roughly in step with it.
The image resizer does this with three modes. Fit keeps the whole picture inside the size you type and keeps its proportions; use it when you only care about the width. Fill crops the center to cover the exact size; use it for fixed slots such as a card thumbnail. Stretch forces the size and distorts the picture, so it is rarely what you want. The image is never uploaded.
A worked example: one photo, one blog post
You have a phone photo of a product for a post with an 800-pixel column.
- If it came from an iPhone, check the extension. iPhones save HEIC by default, and plenty of site editors and upload forms reject it. HEIC to JPG converts it; this one uploads the photo for conversion, and takes files up to 50 MB.
- In the image resizer, set 1600 pixels wide in Fit mode and choose WebP as the output format, with a quality around 80%. Look at the preview at full size and only go higher if you see blotches in smooth areas such as sky or skin. Resizing and converting in one step means the photo is compressed once, not twice.
- Check the size the resizer reports against the original before you download.
- If your site builder refuses WebP, run the same step again from the original photo with JPEG as the output format.
If you would rather do the size and the quality in one pass, the image compressor takes a maximum width and height, a quality and an output format of JPEG, PNG or WebP together, and then shows the original and new sizes side by side. Its maximum size never enlarges a small image.
Screenshots and logos: when to leave PNG alone
Take a 1440 x 900 screenshot of a settings page. It is mostly flat color and text. Saved as JPG, the letters pick up a gray haze that makes the image look cheap, and the file is often not much smaller, because flat areas were already cheap to store in PNG. Keep it as PNG, or run it through Convert to WebP with lossless compression turned on, which keeps every pixel, and keep whichever file is smaller. The converter shows how much smaller or larger its result is than what you gave it.
The opposite case is a PNG that should never have been one: a photo exported as PNG by a phone app or a design tool. There the switch to JPG is worth doing. PNG to JPG fills any transparent areas with a background color you pick (white for a page with a white background) and shows how the size changed. If the result is larger, lower the quality and convert again.
The order of operations
- Convert anything the web will not show, such as HEIC, into JPG.
- Resize to twice the displayed width.
- Choose the format by content: photo to WebP or JPG, flat graphics and text to PNG or lossless WebP.
- Compare the output size with the input before you keep it.
Keep the original file. Every lossy save throws detail away for good, so when you need a different size next month, start again from the original, not from the version you already compressed.