Skip to content

guide

Image File Formats for Web and Print

Choose the right image format for web, social, print and design handoff. Compare JPEG, PNG, WebP, AVIF, SVG and PDF.

Last checked: 2026-05-03

Last checked: 2026-05-03 Source: MDN Web Docs: Image file type and format guide Found a spec change? Send correction.

Quick answer

Copy-ready answer

Use JPEG for most photos, PNG for transparency and screenshots, WebP or AVIF for efficient web images, SVG for vector icons and diagrams, and PDF for many print handoffs. The best format depends on whether you need small file size, transparency, crisp edges, vector shapes, or print-ready output.

Image File Formats for Web and Print

Dimensions and specs

JPEG Best for: Photos, print-lab uploads, web photos; Main advantage: Small files for photos; Main caution: No transparency; repeated saves can degrade quality
PNG Best for: Screenshots, transparency, sharp UI graphics; Main advantage: Precise reproduction and transparency; Main caution: Large files for photos
WebP Best for: Web images, thumbnails, compressed photos; Main advantage: Good compression and broad modern support; Main caution: Not every platform accepts it
AVIF Best for: Modern web performance; Main advantage: Very efficient compression; Main caution: Some workflows and platforms may not accept it
SVG Best for: Logos, icons, diagrams, vector guides; Main advantage: Scales cleanly at any size; Main caution: Not for normal photos
PDF Best for: Print handoff, documents, templates; Main advantage: Can preserve pages, vectors and print settings; Main caution: Not ideal for social uploads that require raster images

Formula

How to calculate this size

Print formulapixels = inches x PPI

Convert physical size to inches, then multiply each side by the target PPI.

Digital formularatio = width / height

Match the target aspect ratio before exporting to avoid unexpected crop or padding.

Bleed formulafull size = trim + bleed x 2

Add bleed to both sides of each dimension before calculating the final canvas.

Details

AVIF

AVIF can provide very efficient compression for modern web images. It is useful when performance matters and your delivery stack supports it.

Use AVIF for:

  • modern responsive websites;
  • image-heavy landing pages;
  • performance-sensitive pages where compatibility is handled.

Avoid AVIF if your target platform, CMS, printer or user workflow does not accept it.

Details

JPEG

JPEG is usually the safest choice for normal photographs. It compresses photo detail well and is widely accepted by websites, social platforms and print labs.

Use JPEG for:

  • camera photos;
  • product photos without transparency;
  • photo print uploads;
  • blog and web images where transparency is not needed;
  • social media posts when the platform accepts JPEG.

Avoid JPEG when:

  • you need transparent background;
  • the image is mostly text or UI lines;
  • you need lossless editing across many export rounds.

Details

PNG

PNG is useful when an image needs transparency, crisp edges or more precise reproduction than JPEG.

Use PNG for:

  • screenshots;
  • transparent logos;
  • interface images;
  • diagrams;
  • images with sharp text or flat-color areas.

Avoid PNG for large photographic web images unless you specifically need transparency or lossless detail.

Details

WebP

WebP is a strong web format because it often creates smaller files than JPEG or PNG while preserving good visual quality. It can support transparency and animation.

Use WebP for:

  • website images;
  • thumbnails;
  • compressed photo galleries;
  • performance-sensitive pages.

Check platform compatibility before using WebP for uploads outside your own site.

Details

SVG

SVG is a vector format. It is ideal for shapes that should stay sharp at any size.

Use SVG for:

  • icons;
  • simple logos;
  • diagrams;
  • template guides;
  • measurement overlays;
  • UI illustrations.

Do not use SVG for normal photographs.

Details

PDF

PDF is often the right handoff format for print, documents and templates. It can preserve page size, vectors, text and print settings when exported correctly.

Use PDF for:

  • print-ready documents;
  • templates;
  • brochures;
  • flyers;
  • forms;
  • vector artwork handoff.

Check printer requirements for bleed, crop marks, color settings and PDF preset.

Guidance

Format recommendations by task

TaskRecommended format
Uploading a photo to a print lab JPEG, unless the lab asks otherwise
Exporting a print-ready flyer PDF
Creating a transparent logo PNG or SVG
Publishing photos on a website WebP or JPEG, with responsive sizes
Publishing icons on a website SVG
Sharing a screenshot PNG
Creating a downloadable measurement template PDF plus SVG/PNG preview

Guidance

File size and quality

A larger file is not automatically better. The right file is the one that preserves enough visible quality for the final use without unnecessary weight.

For web pages, oversized images can slow the page. For print, overly compressed images can show artifacts. For templates, vector PDF or SVG may stay sharper than a raster image.

Related

Related pages and tools

Same branch

Nearby pages

FAQ

Common questions

Is JPEG or PNG better?

JPEG is usually better for photos because it creates smaller files. PNG is usually better for transparency, screenshots and sharp UI graphics.

Is WebP better than JPEG?

For many web images, WebP can offer smaller files at similar visual quality. Use JPEG when compatibility or platform acceptance matters more.

Should I use PDF for print?

Often yes. PDF is a common print handoff format because it can preserve page size, vector content and bleed settings when exported correctly.

Is SVG good for photos?

No. SVG is for vector artwork such as icons, diagrams and logos. Use JPEG, WebP, AVIF or PNG for raster images.

References

Sources and references

Content values are calculated from the dimensions and formulas shown on this page. External sources are listed where a platform, standard, or publisher reference is available.

Last checked: 2026-05-03