Image format checker. WebP + AVIF audit.
Paste HTML. We scan every <img> tag for format (JPG / PNG / WebP / AVIF / SVG / GIF), loading="lazy" attribute, srcset/sizes presence, and width/height attributes for CLS prevention.
Sources used
- web.dev WebP guide
- web.dev lazy-loading images
- web.dev optimize CLS (width/height impact)
- MDN img attribute reference
Parsing happens entirely in your browser.
Privacy: parsing happens in your browser. Nothing is sent or logged.
How to use the Image Format Checker
This checker reads pasted HTML and audits every img tag in it. It works out each image's format from the file extension and counts how many images use lazy loading, srcset, width and height, and alt text. Use it to see how far a page has moved to WebP or AVIF and which image habits are hurting its load speed or layout.
Step by step
-
Copy the page HTML
Open the page you want to audit and copy its HTML. View source works for most sites. For pages that add images with JavaScript, copy the rendered HTML from your browser's developer tools instead, so those images are included.
-
Paste it into the box
Paste into the box that says "Paste HTML here (full page source or just the body)". A whole page or a single section both work. The results update as soon as the text changes, with no button to press.
-
Read the summary
The summary shows the total number of img tags found and the modern format %, the share of images that are WebP, AVIF or SVG.
-
Check the breakdown and coverage
Format breakdown lists how many images use each extension. Attribute coverage counts the images with loading="lazy", with srcset, with both width and height (shown as w+h dimensions), and the number with no alt attribute at all.
-
Work through the findings
The findings list turns the counts into fixes, such as zero modern formats, no lazy loading, images missing width and height, missing alt text or no srcset. When nothing is flagged it reads Healthy image setup.
Reading the numbers
- Modern format % turns green at 70% or more. For example, 10 images with 7 WebP files and 3 JPGs shows 70%.
- In attribute coverage, a count turns green when it clears its bar: lazy loading on at least 70% of images, srcset on more than half, width and height on more than 90%, and zero images missing alt. Below that it shows amber.
- The format comes from the extension at the end of the src, or data-src when there is no src. An image with no extension, such as a URL from an image service or a data URI, is counted as .other.
- Some findings only appear past a size. No lazy-loading and No srcset are only flagged on HTML with more than 5 images, and missing width and height is flagged when fewer than half the images have both.
Tips and common mistakes
- Only img tags are read. In a picture element, the source tags are ignored, so a picture that serves AVIF with a JPG fallback img counts as a JPG.
- Do not add loading="lazy" to the main image at the top of the page. Lazy load the images further down instead, so the first thing a visitor sees is not delayed.
- An empty alt="" counts as present, which is correct for decorative images. Only images with no alt attribute at all are counted as missing.
- Image services that pick the format on the fly often use URLs without an extension. If many images show as .other, check the real format in the network panel of your browser's developer tools.
Privacy and limits
The HTML is parsed in your browser and nothing is sent anywhere. The checker reads the tags only, so no images are downloaded and no scripts in the pasted code run. Nothing is saved after you leave the page.
Modern formats cut bytes 30-50%.
AVIF compresses 25-50% better than WebP. WebP compresses 25-35% better than JPG. Both are universally supported in modern browsers (WebP since 2020, AVIF since late 2022). Beyond format, three other img-tag attributes are critical: loading=lazy (free LCP improvement on below-fold images), srcset (responsive serving prevents mobile from downloading desktop images), and width+height (CLS prevention since browsers compute aspect ratio from these). The checker above audits all four signals in pasted HTML.
Three image-optimization rules. One, ship WebP minimum (AVIF if your CDN supports it cheaply). Two, lazy-load every below-the-fold image, never lazy-load the LCP candidate. Three, always include width+height attributes, CLS prevention is free with this single attribute pair.
Tools in the same cluster: Image Compression Calculator for the byte-savings projection. Page Weight Analyzer for the byte breakdown. Image Alt Checker for the alt-attribute audit.
Five answers.
WebP vs AVIF, which should I use?
AVIF compresses 25-50% better than WebP at equivalent quality. WebP compresses 25-35% better than JPG. Both are universally supported in modern browsers (WebP since 2020, AVIF since late 2022). Modern picture-element setup ships AVIF first with WebP fallback then JPG fallback for ancient browsers. For most sites, the bigger win is moving off JPG/PNG to WebP, a 30% byte reduction across 100+ images is meaningful. AVIF is the next-step optimization; the encode cost is higher so most CDNs charge extra for it.
Why do I need width and height on every img?
width and height attributes let the browser reserve layout space before the image loads, preventing Cumulative Layout Shift (CLS), one of three Core Web Vitals. Pages with un-sized images commonly fail CLS's 0.1 good threshold because content jumps when each image loads. The fix is trivial: set width + height (browsers compute aspect ratio automatically since 2019) on every img. The checker above flags every img missing dimensions.
When should I use loading='lazy'?
loading='lazy' tells the browser to defer image fetch until the image is near the viewport. Apply to ALL below-the-fold images; it's a free LCP improvement (less competing fetches during initial load). NEVER apply to above-the-fold hero images or LCP candidate images, lazy-loading the LCP image directly hurts LCP timing. Most sites should be at 80%+ of img tags lazy; the checker above shows your adoption percentage.
What about srcset for responsive images?
srcset + sizes lets the browser choose the right image size for the device, preventing mobile users from downloading desktop-sized images. A 2000px hero downscaled to 400px on mobile wastes 90% of the bytes. The pattern: srcset='hero-400.jpg 400w, hero-800.jpg 800w, hero-1600.jpg 1600w' sizes='(max-width: 768px) 400px, (max-width: 1200px) 800px, 1600px'. Modern image CDNs (Cloudflare Images, Vercel Image Optimization, Shopify CDN) generate the variants automatically. The checker above shows srcset adoption per img.
Does this tool save my data?
No. Parsing happens in your browser. Nothing is sent to any server.
Still on JPG-only?
Our web development engagements ship WebP/AVIF migration via image CDN, lazy-loading discipline, srcset for responsive serving, and width/height for CLS prevention.
Published · Last updated .