Online Tools & Image Optimization
WebP vs JPEG vs PNG: Which Image Format Should You Use on Your Website?
The format you save an image in decides its file size, sharpness and whether it can be transparent. Compare the main web formats in plain English, then get a recommendation for your own image with a free tool.
Use JPEG or WebP for photos, PNG or lossless WebP for screenshots and sharp-edged graphics, SVG for logos and icons when you have a vector file, and short video or animated WebP instead of large GIFs. WebP is often smaller than JPEG and PNG at similar quality and works in modern browsers, while JPEG and PNG remain the safest choices for maximum compatibility.
Not sure which applies to your image? The free format recommender below gives a recommendation from four quick questions. It is a rule-based tool in your browser, not AI.
You export a photo, upload it, and your page suddenly feels heavy. Or you save a logo as a JPEG and its edges turn muddy. The format you save an image in decides how big the file is, how sharp it looks and whether it can have a transparent background. This guide explains the main web image formats in plain English and helps you pick the right one for each job.
The formats at a glance
| Format | Compression | Transparency | Animation | Best for |
|---|---|---|---|---|
| JPEG | Lossy | No | No | Photographs, where wide compatibility matters. |
| PNG | Lossless | Yes | No (in normal use) | Screenshots, logos, graphics with sharp edges or text. |
| WebP | Lossy or lossless | Yes | Yes | Photos and graphics when you want smaller files. |
| AVIF | Lossy or lossless | Yes | Yes | Newer format that can be smaller still. Check support in your tools first. |
| SVG | Vector (not pixels) | Yes | Can be animated | Logos, icons and simple illustrations. |
| GIF | Lossless, 256 colours | Limited | Yes | Very short loops where compatibility matters. Often large. |
“Lossy” means the format throws away detail you are unlikely to notice to make the file smaller. “Lossless” keeps every pixel, so files are usually larger. Features and browser support change over time, so check current documentation such as MDN’s image format guide before relying on a newer format.

Image format recommender
Answer four questions and get a recommended format, a backup option, a settings tip and things to watch for. It follows fixed rules written for this article, so the same answers always give the same result and different answers give different results. It is not AI, it does not look at your image, and nothing leaves your browser.
Try an example:
How the formats really differ
Photos: JPEG and WebP
Photos contain smooth gradients and fine detail, which lossy compression handles well. JPEG works almost everywhere. WebP is often smaller at similar visual quality, and modern browsers support it, but a very old browser or app may not.
Screenshots and text: PNG and lossless WebP
Lossy compression blurs thin lines and text, which is why screenshots saved as JPEG look fuzzy around letters. PNG keeps edges sharp, though files can be large. Lossless WebP can be a smaller alternative.
Logos and icons: SVG first
An SVG is a set of shapes, not pixels, so it stays sharp at any size and is usually tiny. If you only have a pixel version, PNG with transparency is the safe fallback. WordPress does not accept SVG uploads by default for security reasons, so enable it only through a trusted method and upload only files you trust.
Animation: avoid big GIFs
GIF is limited to 256 colours and files grow quickly. For anything longer than a short loop, a small MP4 or WebM video is usually lighter. Animated WebP is an option for short loops.
Illustrative example (made-up numbers, not a test): A 1,600 px wide blog photo saved as a high-quality JPEG might be several hundred kilobytes. Exported as lossy WebP at a similar visual quality, it may be noticeably smaller. Always compare the two files at full size before you decide.
How to choose in four questions
- What is the image? Photos, screenshots, logos and animations each have a different best format.
- Does it need transparency? JPEG cannot do it. PNG, WebP, AVIF and SVG can.
- What is your priority? Smallest files point toward WebP or AVIF. Maximum compatibility points toward JPEG and PNG.
- Will you need the original later? Keep a full-quality master (TIFF, PNG or the camera original) and publish a separate web copy.

Using these formats in WordPress
- WebP: modern WordPress versions accept WebP uploads. If an upload is refused, check your WordPress version and hosting settings.
- AVIF: support depends on your WordPress version, your server and any image plugin, so test it before you rely on it.
- SVG: not allowed by default. Use a trusted plugin or theme feature, and only upload SVG files from sources you trust.
- Resizing: WordPress creates smaller copies of uploads, but it does not choose the best format for you. Resize and compress first. Our guide to compressing images for WordPress includes a browser-based compressor, and our website image size guide lists dimensions for each use.
Heavy images are one of the common reasons a page feels slow. If you want the bigger picture, read why a WordPress site is slow and our guide to a page weight performance budget.
A simple workflow
- Start from the original file, not a copy you have already compressed.
- Resize to the width the page actually shows.
- Pick the format with the recommender or the table above.
- Export, then compare the result with the original at full size.
- Give the file a descriptive name and add ALT text when you upload it.
Common mistakes
- Saving a screenshot as a JPEG. Text and lines become fuzzy.
- Using JPEG for a logo with a transparent background. The transparency becomes a solid colour.
- Uploading a PNG photo. It is usually far larger than a JPEG or WebP.
- Converting a compressed file again and again. Each lossy pass lowers quality. Always export from the original.
- Using GIF for long animations. A short video is usually lighter.
- Trusting a rule without checking. Compare the real files, because results depend on the image.
Troubleshooting
My WebP image does not show
Very old browsers or apps may not support it. Offer a JPEG or PNG version where compatibility matters, or check how your theme or image plugin serves fallbacks.
My PNG is huge
Resize it to the displayed width first. If it is a photo, switch to JPEG or WebP. If it is a flat graphic, reducing the number of colours can help.
The edges of my logo look blurry
The image was probably saved at a low resolution or as a lossy format. Use SVG, or export a larger PNG.
WordPress will not let me upload the file
The format may not be allowed by default (SVG, for example), or your WordPress version may not support it. Convert to a supported format.
The recommender says to choose an option
All four questions need an answer. Choose one in each list and try again.
FAQ
Is WebP better than JPEG?
Often smaller at similar quality, and widely supported in modern browsers. JPEG is still the most compatible option, so the best choice depends on your priority.
Should I convert all my old images to WebP?
Not necessarily. Start with the largest images on your most visited pages, and compare quality before you replace anything.
When should I use PNG instead of JPEG?
Use PNG for screenshots, text and graphics with sharp edges or transparency. Use JPEG for photos.
Is AVIF better than WebP?
It can produce smaller files, but support and encoding speed vary. Test it in your setup before you commit.
Does the recommender look at my image?
No. It uses your four answers and fixed rules. It does not read or upload the image.
Does the image format affect SEO?
Smaller, well-sized images help pages load faster, which is good for visitors. The format alone does not guarantee any ranking result.
Conclusion
Choosing a format comes down to the type of image, whether it needs transparency, what you care about most and where it will be used. Use JPEG or WebP for photos, PNG or lossless WebP for sharp graphics, SVG for logos and short video instead of heavy GIFs. Then resize, compress and compare the result before you publish.
Haven’t tried the format recommender yet? Answer four questions and get a recommendation for your next image.
Related reading
(function () { var root = document.getElementById('tz-top'); if (!root) { return; } var $ = function (id) { return document.getElementById(id); }; var el = { type: $('tz-type'), trans: $('tz-trans'), prio: $('tz-prio'), use: $('tz-use'), go: $('tz-go'), copy: $('tz-copy'), reset: $('tz-reset'), status: $('tz-status'), ans: $('tz-answer') }; var EX = [{ t: 'photo', tr: 'no', p: 'smallest', u: 'web' }, { t: 'screenshot', tr: 'no', p: 'quality', u: 'web' }, { t: 'logo', tr: 'yes', p: 'compat', u: 'web' }]; var last = '';
function setStatus(m, k) { el.status.textContent = m; el.status.className = 'tz-status' + (k ? ' tz-' + k : ''); }
function recommend(t, tr, p, u) { var r = { primary: '', backup: '', settings: '', why: [], watch: [] }; var webp = false; if (t === 'photo') { if (tr === 'yes') { r.primary = 'WebP (lossy, with transparency)'; r.backup = 'PNG (larger files, widest support)'; r.why.push('JPEG cannot store transparency, and PNG photos are usually large.'); webp = true; } else if (p === 'smallest') { r.primary = 'WebP (lossy)'; r.backup = 'JPEG'; r.why.push('Photos compress well with lossy formats, and WebP is often smaller than JPEG at similar quality.'); webp = true; } else if (p === 'quality') { r.primary = 'High-quality JPEG or WebP'; r.backup = 'PNG only if you cannot accept any compression artefacts (files will be much larger)'; r.why.push('A higher quality setting keeps more detail while still being far smaller than a lossless photo.'); webp = true; } else { r.primary = 'JPEG'; r.backup = 'WebP for modern browsers'; r.why.push('JPEG is understood by virtually every browser, app and email client.'); } r.settings = 'Start around quality 75 to 85, then compare with the original at full size and adjust.'; } else if (t === 'screenshot') { if (tr === 'yes') { r.primary = 'PNG'; r.backup = 'Lossless WebP'; } else if (p === 'smallest') { r.primary = 'Lossless WebP'; r.backup = 'PNG'; webp = true; } else if (p === 'quality') { r.primary = 'PNG'; r.backup = 'Lossless WebP'; } else { r.primary = 'PNG'; r.backup = 'High-quality JPEG, only if the text stays clean'; } r.why.push('Lossless formats keep thin lines and text sharp, where lossy compression blurs them.'); r.settings = 'Keep it lossless and resize to the width the page displays.'; if (r.primary.indexOf('WebP') > -1 || r.backup.indexOf('WebP') > -1) { webp = true; } } else if (t === 'logo') { r.primary = 'SVG (if you have a vector version)'; r.backup = tr === 'yes' ? 'PNG with transparency, or lossless WebP' : 'PNG, or lossless WebP'; r.why.push('SVG stays sharp at any size and is usually very small.'); r.settings = 'Export the SVG from your design tool and remove unneeded metadata. For PNG, export at about twice the displayed size.'; r.watch.push('WordPress blocks SVG uploads by default. Enable it only through a trusted method, and upload only SVG files from sources you trust.'); } else if (t === 'illustration') { if (p === 'smallest') { r.primary = 'WebP (lossless for flat colours, lossy for gradients)'; r.backup = 'PNG'; webp = true; } else if (p === 'quality') { r.primary = 'PNG or lossless WebP'; r.backup = 'High-quality JPEG if there is no transparency'; webp = true; } else { r.primary = 'PNG'; r.backup = 'JPEG if there is no transparency and it is gradient-heavy'; } r.why.push('Flat colours suit lossless formats, while smooth gradients can band in heavily compressed files.'); r.settings = 'Try lossless first, then lossy at a high quality, and compare file sizes.'; } else if (t === 'chart') { r.primary = 'SVG if it is exported as a vector, otherwise PNG'; r.backup = 'Lossless WebP'; webp = true; r.why.push('Charts contain sharp lines and text that lossy compression would blur.'); r.settings = 'Export at about twice the displayed size so labels stay readable on sharp screens.'; } else if (t === 'animation') { r.primary = 'A short MP4 or WebM video for anything beyond a brief loop'; r.backup = tr === 'yes' ? 'Animated WebP (supports transparency)' : 'Animated WebP, or GIF if you need maximum compatibility'; r.why.push('GIF files grow quickly because they are limited to 256 colours.'); r.settings = 'Keep it short, reduce the frame size and frame rate, and avoid autoplaying large files.'; webp = true; } if (u === 'print') { r.why.push('Keep the original master (TIFF, PNG or the full-quality file) and publish a separate web copy.'); } if (p === 'compat') { r.watch.push('Very old browsers and some apps may not display newer formats such as WebP or AVIF. JPEG and PNG are the safest.'); } if (webp) { r.watch.push('Modern WordPress versions accept WebP uploads. If yours refuses one, check your WordPress version and host settings.'); } r.watch.push('Resize to the displayed width before you compress, and compare the result with the original at full size.'); return r; }
function show() { if (!el.type.value || !el.trans.value || !el.prio.value || !el.use.value) { el.ans.hidden = true; el.copy.disabled = true; setStatus('Please answer all four questions.', 'err'); return; } var r = recommend(el.type.value, el.trans.value, el.prio.value, el.use.value); el.ans.innerHTML = ''; function line(label, text) { var p = document.createElement('p'), b = document.createElement('strong'); b.textContent = label + ' '; p.appendChild(b); p.appendChild(document.createTextNode(text)); el.ans.appendChild(p); } var h = document.createElement('h3'); h.textContent = 'Recommended: ' + r.primary; el.ans.appendChild(h); line('Backup option:', r.backup); if (r.settings) { line('Settings tip:', r.settings); } function list(title, items) { if (!items.length) { return; } var p = document.createElement('p'), b = document.createElement('strong'); b.textContent = title; p.appendChild(b); el.ans.appendChild(p); var ul = document.createElement('ul'); items.forEach(function (x) { var li = document.createElement('li'); li.textContent = x; ul.appendChild(li); }); el.ans.appendChild(ul); } list('Why:', r.why); list('Watch out for:', r.watch); last = 'Image format recommendation\nRecommended: ' + r.primary + '\nBackup: ' + r.backup + (r.settings ? '\nSettings: ' + r.settings : '') + '\nWhy:\n- ' + r.why.join('\n- ') + '\nWatch out for:\n- ' + r.watch.join('\n- '); el.ans.hidden = false; el.copy.disabled = false; setStatus('Recommendation ready.', 'ok'); }
el.go.addEventListener('click', show); el.reset.addEventListener('click', function () { el.type.value = ''; el.trans.value = ''; el.prio.value = ''; el.use.value = ''; el.ans.hidden = true; el.ans.innerHTML = ''; el.copy.disabled = true; last = ''; setStatus('', ''); }); el.copy.addEventListener('click', function () { if (!last) { return; } function fb() { var ta = document.createElement('textarea'); ta.value = last; ta.setAttribute('readonly', ''); ta.style.position = 'fixed'; ta.style.opacity = '0'; document.body.appendChild(ta); ta.select(); var done = false; try { done = document.execCommand('copy'); } catch (e) { done = false; } document.body.removeChild(ta); setStatus(done ? 'Result copied.' : 'Copy was blocked by your browser. Select the text and copy it manually.', done ? 'ok' : 'err'); } if (navigator.clipboard && window.isSecureContext) { navigator.clipboard.writeText(last).then(function () { setStatus('Result copied.', 'ok'); }, fb); } else { fb(); } }); Array.prototype.forEach.call(root.querySelectorAll('.tz-chip'), function (b) { b.addEventListener('click', function () { var e = EX[Number(b.getAttribute('data-ex'))]; el.type.value = e.t; el.trans.value = e.tr; el.prio.value = e.p; el.use.value = e.u; show(); }); }); })();



