Format ConversionMehdi Tareghi15 min read

Best Format for Website Images in 2026

The complete decision guide for choosing AVIF, WebP, JPG, PNG, SVG, or HEIC for website images — heroes, product photos, screenshots, social previews, and iPhone exports, with fallbacks and publishing workflows.

Minimal website image format decision flow with glowing cards

The best website image format depends on the asset — not on a single "winner" declared in a blog headline. A hero photo, logo, product thumbnail, UI screenshot, iPhone export, and social preview each have different constraints: compression efficiency, edge sharpness, transparency, browser support, CMS upload rules, and what email clients or social crawlers will accept.

This guide is the pillar for the Format Conversion topic cluster. Read it end to end and you will know which format to pick for every common web asset, how to structure fallbacks, and when conversion is required before publish. Each section links to a deeper guide when you need format-specific comparisons or step-by-step conversion workflows.

What this guide covers

SectionWhat you will learn
Why format still mattersBrowser support, bytes, and compatibility
Decision tableQuick lookup by asset type
Decision flowchartStep-by-step logic for any file
Format profilesStrengths and limits of each format
Browser supportWho can decode what
Default stackThe <picture> pattern most sites should use
HEIC and iPhoneWhen to keep HEIC vs convert
Choose by page roleHeroes, products, docs, social
Multi-format strategyAVIF + WebP + JPEG without waste
Publishing workflowFrom grouped assets to live page
SEO and performanceWhy format choice affects rankings indirectly
Cluster guidesEvery deep dive in this topic

Why format choice still matters in 2026

We have had "use WebP" advice for years. AVIF is now viable. JPEG refuses to die. PNG still appears in every design export folder. The landscape is better than 2018 — but more complex, not simpler.

Format choice affects four outcomes simultaneously:

OutcomeHow format helps or hurts
Page speedAVIF and WebP shrink LCP candidates; PNG heroes bloat pages
Visual qualityWrong format forces ugly compression or visible artifacts
CompatibilityHEIC uploads fail; WebP email fails; JPEG works everywhere
Workflow frictionCMS may reject AVIF; design tools export PNG by default

There is no universal winner. There is a decision process — and this guide is that process.

The website format decision table

AssetBest formatFallbackAvoid
Hero photoAVIFWebP / JPGPNG at full camera resolution
Blog inline photoWebP or AVIFJPGUnoptimized JPEG from camera
Product photoWebP or AVIFJPGHEIC direct upload
Product thumbnailWebPJPGOversized PNG
UI screenshotPNG or lossless WebPPNGLossy AVIF on small text
Logo / iconSVGPNGRaster when vector is possible
Open Graph imageJPG or WebPJPGAVIF-only with no JPG fallback
Transparent graphicPNG or WebPPNGJPEG (no alpha)
iPhone export for webWebP or AVIF (after conversion)JPGHEIC on upload forms
Email heroJPG or PNGWebP, AVIF, HEIC
Animated contentWebM / MP4 videoGIF (small only)Large GIF for video-like content

Use the batch image compressor to export variants from the same source and compare real byte savings — not theoretical benchmarks from a blog post.

The format decision flowchart

When you are staring at an exported file and unsure, walk through these questions in order:

  1. Is it vector artwork (logo, icon, diagram)? → SVG. Stop here if the SVG is clean and small.
  2. Does it contain small text or sharp UI edges? → PNG or lossless WebP.
  3. Is it a photograph or photo-like image? → Continue to step 4.
  4. Will it appear above the fold as an LCP candidate? → AVIF primary, WebP secondary, JPEG fallback.
  5. Is it a general web photo (blog, product, inline)? → WebP primary, JPEG fallback.
  6. Did it come from an iPhone as HEIC? → Convert first, then apply steps 4–5.
  7. Is it for email? → JPEG or PNG only.
  8. Is it for Open Graph / social preview? → JPG or WebP at 1200×630; verify crawler compatibility.

If two branches apply — a screenshot with a photo background, for example — split the asset or choose the branch that protects the most critical detail (usually text clarity).

Format profiles: AVIF, WebP, JPEG, PNG, SVG

Understanding why a format fits helps you break the "always use X" habit.

AVIF

Best for: Large photographic heroes, product detail shots, any LCP candidate where byte size directly affects load time.

Strengths:

  • Often 30–50% smaller than JPEG at equal perceived quality
  • Excellent on gradients and natural photos
  • Supports transparency and HDR (rarely needed for web)

Tradeoffs:

  • Slower to encode — fine for pre-publish prep, painful for real-time user uploads
  • Not every CMS, email client, or social crawler accepts AVIF uploads
  • Must pair with WebP or JPEG fallback in <picture> markup

When to skip: Small icons, screenshots with text, logos with sharp edges, email, contexts where only JPEG is accepted.

Deep dive: Should you use AVIF in 2026? and AVIF vs WebP.

WebP

Best for: General-purpose web images — blog figures, product thumbnails, inline photos, most day-to-day publishing.

Strengths:

  • Broad browser support (all major browsers since 2020)
  • Fast encode and decode
  • Lossy and lossless modes
  • Often 25–35% smaller than JPEG at similar appearance
  • Alpha transparency support

Tradeoffs:

  • Not universal in email clients
  • Some legacy CMS workflows still expect JPEG uploads only
  • Slightly larger than AVIF for the same photo quality

Deep dive: WebP vs JPG.

JPEG

Best for: Final fallback in <picture>, email campaigns, Open Graph tags where every crawler must understand the file, legacy embeds, print-adjacent workflows.

Strengths:

  • Universal compatibility — every browser, crawler, CMS, and email client since 1995
  • Fast decode on all hardware
  • Well-understood quality settings

Tradeoffs:

  • Larger files than WebP or AVIF at equal quality
  • No transparency
  • Repeated re-export causes visible artifacts (generation loss)
  • Banding on smooth gradients at low quality

JPEG is not obsolete. It is the compatibility layer everything else builds on top of.

PNG

Best for: UI screenshots, logos with transparency, simple graphics with flat color, images where lossy banding would look unprofessional.

Strengths:

  • Lossless — pixels preserved exactly
  • Transparency support
  • Predictable edges on text and flat color

Tradeoffs:

  • Large file sizes for photos — a PNG hero from a design tool can be 5 MB
  • No progressive improvement at lower quality — you need lossy formats for photo compression

Rule of thumb: PNG for graphics and screenshots; never PNG for photographic heroes out of habit.

SVG

Best for: Icons, simple logos, diagrams, charts with semantic structure, anything that scales cleanly without rasterization.

Strengths:

  • Infinite scalability without quality loss
  • Tiny file size for simple shapes
  • Accessible when markup is semantic (title, desc elements)
  • CSS-styleable and animatable

Tradeoffs:

  • Not for photographs
  • Complex SVGs from design tools can be heavier than PNG
  • Must sanitize untrusted SVG uploads (XSS vector)
  • Poor choice for photo-realistic illustrations exported as vector

HEIC (iPhone / Apple ecosystem)

Best for: On-device iPhone storage — not direct web publishing.

Strengths:

  • Roughly half the storage of JPEG at similar quality on Apple devices
  • Better highlight and shadow detail than JPEG at same file size

Tradeoffs:

  • Inconsistent upload support on websites, Windows without extensions, email clients
  • Requires conversion before most CMS and social workflows
  • Cannot be embedded in <picture> or <img> without conversion

Deep dives: HEIC vs JPG and HEIC to JPG in the browser.

Browser and crawler support in 2026

You ship multiple formats because clients disagree on what they decode.

ClientAVIFWebPJPEGPNGSVGHEIC
Chrome / EdgeYesYesYesYesYesNo
Safari / iOSYesYesYesYesYesNative only
FirefoxYesYesYesYesYesNo
Googlebot (rendered)YesYesYesYesYesNo
Email clientsRareRareYesYesVariesNo
Open Graph scrapersVariesOftenYesYesNoNo
WordPress uploadPlugin-dependentOftenYesYesYesOften rejected

Practical takeaway: Use <picture> with AVIF → WebP → JPEG for web pages. Keep JPEG or PNG for email and OG fallbacks. Convert HEIC before anything else.

Default stack for most sites

For controlled web pages, use progressive enhancement with <picture>:

<picture>
  <source srcset="/images/hero.avif" type="image/avif" />
  <source srcset="/images/hero.webp" type="image/webp" />
  <img
    src="/images/hero.jpg"
    alt="Oak dining table with natural oil finish, front view"
    width="1200"
    height="800"
    fetchpriority="high"
  />
</picture>

How browsers choose: The first <source> with a supported type wins. The <img> is mandatory — it provides alt text, dimensions, and the fallback URL. Non-supporting browsers, some crawlers, and social scrapers typically use the <img src>.

Critical detail: Make the JPEG fallback high quality, not a 20 KB thumbnail. Google indexes the resolved URL. Users on old browsers see the fallback. A blurry fallback defeats the purpose of shipping AVIF to everyone else.

For responsive heroes, combine <picture> with srcset:

<picture>
  <source
    srcset="/images/hero-800.avif 800w, /images/hero-1200.avif 1200w, /images/hero-1800.avif 1800w"
    sizes="(min-width: 1024px) 1200px, 100vw"
    type="image/avif"
  />
  <source
    srcset="/images/hero-800.webp 800w, /images/hero-1200.webp 1200w, /images/hero-1800.webp 1800w"
    sizes="(min-width: 1024px) 1200px, 100vw"
    type="image/webp"
  />
  <img
    src="/images/hero-1200.jpg"
    srcset="/images/hero-800.jpg 800w, /images/hero-1200.jpg 1200w, /images/hero-1800.jpg 1800w"
    sizes="(min-width: 1024px) 1200px, 100vw"
    alt="Oak dining table with natural oil finish, front view"
    width="1200"
    height="800"
    fetchpriority="high"
  />
</picture>

For big photos, start with the AVIF compressor. For bulk publishing, WebP is often faster and easier.

Need a four-way comparison with byte-size examples? Read JPEG vs PNG vs WebP vs AVIF in our compression cluster.

HEIC and iPhone photos

If you shoot on iPhone, your camera roll is probably HEIC. That is fine for storage. It is not fine for most web upload forms, Windows share folders, or client email attachments.

The iPhone-to-web pipeline

  1. Shoot in HEIC — keep it on the phone for storage efficiency.
  2. Before web publish — convert to your web target format locally.
  3. Resize to layout needs — conversion alone does not fix 4032px width.
  4. Strip EXIF — iPhone photos often include GPS and device metadata.
  5. Upload the web-ready file — WebP, AVIF, or JPEG depending on destination.

Use the HEIC to JPG converter for quick compatibility exports, or the batch compressor when you need WebP/AVIF for a full shoot.

When to keep HEIC vs convert

DestinationHEIC OK?Recommended export
iPhone / iCloud storageYesKeep HEIC
AirDrop to MacYesKeep HEIC or convert as needed
WordPress / Shopify uploadUsually noWebP or JPEG
Email attachmentNoJPEG
Client Windows PCOften noJPEG
Modern website <picture>No (convert first)AVIF + WebP + JPEG

Choose by page role

Different parts of a website tolerate different tradeoffs. Treat format selection as a content design decision, not a build-step afterthought.

Homepage and landing pages

  • Hero: Test AVIF first — the image is large enough for savings to matter. Keep WebP and JPEG fallbacks. Preload the LCP candidate.
  • Feature icons: SVG or PNG — not lossy WebP unless the artwork is photographic.
  • Customer portraits: WebP is often the easiest batch default; AVIF when byte budget is tight.
  • Background textures: JPEG or WebP at moderate quality; often decorative with empty alt.

Ecommerce

Keep the source archive separate from the published set. Retouching masters can stay as high-quality JPEG, TIFF, or PNG outside the website. The storefront receives web-sized exports:

AssetFormatNotes
Product detail (zoom)WebP or AVIF + JPG fallback1600–2048px typical
Collection thumbnailWebPConsistent dimensions across catalog
Variant swatchesPNG or SVGColor accuracy matters
Lifestyle heroAVIF + fallbacksLCP candidate on collection pages

Pair format choice with pre-upload compression: compress images for Shopify.

Documentation and SaaS marketing

Screenshots with small text fail as aggressive AVIF. Default to PNG or lossless WebP. Photographic hero backgrounds on the same page can still use AVIF — group assets by role before exporting, not by page.

A single docs page might need three format strategies:

  • Hero background photo → AVIF
  • UI screenshot with annotations → PNG
  • Team headshot → WebP

Blogs and editorial

Inline figures are usually WebP at quality 80–84. Featured images that appear in social cards need a separate OG export in JPEG even if the on-page figure uses AVIF — some scrapers ignore <picture> sources.

Newsletters and social cards

  • Email: JPEG or PNG only — many clients ignore WebP. Keep heroes under 200 KB at 600px wide.
  • Open Graph: Exactly 1200×630, JPG or WebP under 200 KB. Set og:image:alt where your platform supports it.
  • Twitter/X cards: Same 1200×630 convention; verify crop safe zones for text overlays.

See best image sizes for Open Graph and social media for dimension and format specifics.

When to ship multiple formats

You do not need five copies of every image. You need copies your template actually references.

Page typeFormats to exportSkip
High-traffic landing heroAVIF + WebP + JPEGPNG
Blog inline figureWebP + JPEG fallbackAVIF unless size-critical
Product thumbnailWebPAVIF (diminishing returns at small size)
ScreenshotPNG or lossless WebPJPEG, AVIF
OG / social onlyJPEGAVIF (scrapers may not pick it up)

Export discipline prevents the asset folder mess where every image has six unused variants "just in case."

SEO and performance angle

Formats do not rank by name. They matter because smaller files improve LCP, reduce bandwidth, and make responsive images practical. Google indexes the resolved image URL — typically your <img src> fallback — so that file must be good, not just the AVIF <source>.

Pair modern formats with:

  • Descriptive filenames and alt text
  • Explicit width and height to prevent CLS
  • Accurate srcset and sizes for responsive delivery
  • Image sitemaps when images drive your business model

Full pipeline: image SEO in 2026.

Performance-specific deep dives: how images affect LCP · optimize images for Core Web Vitals.

A simple publishing workflow

  1. Group images by role — hero, inline, product, screenshot, logo, social preview.
  2. Decide the best format for each role — use the decision table and flowchart above.
  3. Resize to layout needs before compression — see how to compress without losing quality.
  4. Export only the formats your template uses — AVIF + WebP + JPEG for <picture> heroes; WebP + JPEG for inline figures.
  5. Name files descriptively before upload — oak-table-front-view.webp, not export-final-2.webp.
  6. Check the final page in a browser — not only in your image tool. Verify DevTools Network tab shows the expected format for your browser.

House rules document

Write a one-page format policy for your team:

  • Hero: AVIF 55 + WebP 82 + JPEG 85, max 1920px
  • Inline: WebP 82, max 1400px
  • Screenshot: PNG
  • Logo: SVG
  • OG: JPEG 1200×630 under 200 KB
  • iPhone imports: convert HEIC before anything else

Consistency beats debating format choice on every upload.

Common mistakes

  • Using PNG for photographic heroes because the source came from a design tool.
  • Uploading huge JPEGs and expecting the CMS to fix every variant.
  • Serving AVIF to the page but a tiny JPG to the Open Graph tag without checking quality.
  • Choosing WebP for email campaigns where client support is unreliable.
  • Forgetting width and height, then blaming the format for layout shift.
  • Publishing HEIC directly from an iPhone without testing the upload destination.
  • Exporting AVIF-only with no JPEG fallback — rare browser and embed contexts still matter.
  • Converting HEIC to JPEG, then re-converting JPEG to WebP — generation loss; convert once to your final web format.
  • Using the same format for thumbnails and zoom images when they need different dimensions.

How to test your own images

Take one representative photo, one screenshot, and one social preview. Export each as WebP, AVIF, and JPEG at your house quality settings. Compare file size and quality at the actual display size — not fullscreen.

Test assetWhat to compareWhat you learn
Soft lifestyle photoAVIF 55 vs WebP 82 vs JPEG 85AVIF savings on natural texture
UI screenshotPNG vs lossless WebP vs WebP 90Text sharpness threshold
Social previewJPEG vs WebP at 1200×630Scraper compatibility + file size

The winner will be obvious for most assets. The exceptions become your house rules — document them.

Guides in this topic

This pillar maps the format landscape. Each guide below specializes:

GuideBest for
HEIC vs JPGiPhone storage vs web compatibility tradeoffs
HEIC to JPG in the browserPrivate conversion workflow for iPhone exports
WebP vs JPGWhen WebP replaces JPEG and when it does not
Should you use AVIF in 2026?Adoption checklist and CMS considerations
AVIF vs WebP in 2026Head-to-head for photos, heroes, and fallbacks

Related compression guides: JPEG vs PNG vs WebP vs AVIF · How to compress without losing quality

Frequently asked questions

Related tools

Format Conversion
View all guides

Ready to compress images without uploading them?

Open Asset Melt Studio