Start with the image content
JPG is a dependable choice for photographs and other images with continuous color. Its lossy compression can remove data people are unlikely to notice, but repeated editing and saving can introduce halos or block artifacts.
PNG preserves sharp edges and transparency without lossy compression. It suits logos, diagrams, screenshots and interface graphics. A photograph converted to PNG usually grows because PNG cannot discard subtle color variation in the same way as JPG or WebP.
- Photographs: JPG or WebP
- Transparent graphics: PNG or WebP
- Screenshots with text: PNG or lossless WebP
- Simple vector artwork: keep the original SVG when possible
Use modern formats with a fallback plan
WebP supports both lossy and lossless images, transparency and animation. It is a practical default for modern websites because it commonly produces smaller files than JPG or PNG at similar visual quality.
AVIF can compress photographs very efficiently, especially at lower bitrates, but encoding is slower and support in older software is less predictable. Use it when you can test the actual publishing pipeline and provide a fallback for important images.
Check the output rather than trusting a preset
Inspect faces, fine text, gradients and high-contrast edges at the size visitors will see. A smaller file is not useful if a product label becomes difficult to read or a transparent edge gains a visible fringe.
Keep the original source separately. Conversion should create a delivery copy, not replace the only high-quality version of an image.