REF-009 • Tech Reference Tech

Image File Formats

Compare common image formats including JPEG, PNG, GIF, WebP, AVIF, SVG, HEIC, TIFF, BMP, and RAW by compression, transparency, scalability, compatibility, and typical use.

Published
Formats Compression Transparency Web
10+ Common Formats
2 Raster & Vector
≠ Extension ≠ Format
Quick Answer

For photographs, JPEG, WebP, and AVIF are common compressed choices. Use PNG when lossless raster quality or full transparency is important, and SVG for scalable logos, icons, diagrams, and other vector artwork. Formats such as HEIC, TIFF, and camera RAW files are more common in photography, editing, archival, or production workflows than ordinary web delivery.

Quick Lookup

Common Image File Formats

Use this table to compare the main characteristics of common image formats. Features can vary by encoder, application, browser, and operating system.

Format Extension Compression Transparency Typical Use
JPEG .jpg, .jpeg Lossy No alpha channel Photography and general web images
PNG .png Lossless Yes Screenshots, graphics, UI, transparency
GIF .gif Lossless indexed color Limited Simple animation and legacy graphics
WebP .webp Lossy or lossless Yes Modern web images and animation
AVIF .avif Lossy or lossless Yes Modern high-efficiency web images
SVG .svg Vector / text-based Yes Logos, icons, diagrams, illustrations
HEIC .heic Typically lossy or lossless-capable Format-dependent Phone photography and image storage
TIFF .tif, .tiff Various Can support transparency Scanning, publishing, archival workflows
BMP .bmp Usually uncompressed or simple compression Limited / variant-dependent Legacy bitmap graphics
ICO .ico Container Yes Application icons and favicons
JPEG XL .jxl Lossy or lossless Yes Advanced raster imaging; emerging support
RAW .cr3, .nef, .arw, others Camera-specific Not primarily a delivery feature Photography capture and editing
File Format vs MIME Type

A file may use the extension .png while software identifies its media type as image/png. Filename extensions and MIME types are related, but they are separate identifiers. See the MIME Types reference for common media-type values.

Image Structure

Raster vs Vector Images

Most common image files fall into two broad approaches: raster images built from pixels and vector images described using shapes, paths, text, and drawing instructions.

Raster Pixel Grid

JPEG, PNG, WebP, AVIF, GIF, and most photographs store an image primarily as pixels at defined dimensions.

Vector Drawing Instructions

SVG describes shapes, paths, text, fills, and other elements that can scale without the normal pixelation associated with enlarging raster images.

Lossy Smaller Files

Lossy compression discards some image information to reduce file size. JPEG is the classic example.

Lossless Preserve Decoded Data

Lossless compression allows the encoded image data to be reconstructed without the information loss introduced by lossy encoding.

Resolution Matters for Raster Files

A raster image has finite pixel dimensions. Enlarging it substantially can expose softness or visible pixels. Vector artwork such as SVG can instead be rendered at different output sizes from the same geometric description.

Photography Standard

JPEG / JPG

JPEG is one of the most widely recognized raster image formats. It is particularly useful for photographs and other continuous-tone imagery where lossy compression can substantially reduce file size.

Extensions .jpg, .jpeg
MIME Type image/jpeg
Image Type Raster
Compression Lossy
Transparency No standard alpha channel
Good For Photography, thumbnails, general web imagery
Less Suitable For Logos, sharp text, diagrams, repeated editing
JPG and JPEG Are the Same Format

.jpg and .jpeg normally refer to the same JPEG format. The three-letter extension became common on older systems with shorter filename-extension conventions.

Repeated JPEG Saves Can Reduce Quality

Because ordinary JPEG compression is lossy, repeatedly opening, editing, and recompressing the same JPEG can introduce additional visible artifacts. Keep an original or higher-quality working file when further editing is expected.

Lossless & Indexed Graphics

PNG & GIF

PNG and GIF are older web formats with very broad recognition, but they solve different problems. PNG is especially useful for lossless raster graphics and transparency, while GIF remains closely associated with simple frame animation.

Feature PNG GIF
Extension .png .gif
MIME Type image/png image/gif
Compression Lossless Lossless indexed color
Transparency Full alpha transparency Limited transparency
Animation Standard PNG is still; APNG adds animation Yes
Typical Use Screenshots, graphics, UI, transparency Simple animations and legacy web graphics
PNG Is Often Better for Sharp Interface Graphics

Lossless PNG avoids the block and edge artifacts that lossy JPEG compression can create around small text, interface elements, line art, and screenshots.

APNG

Animated PNG extends the PNG family with multiple frames. Its registered media type is image/apng. Modern WebP and AVIF can also represent animated imagery, giving creators several alternatives to GIF.

Modern Web Formats

WebP & AVIF

WebP and AVIF are modern raster formats designed to provide flexible compression and image features for digital delivery. Both can support lossy and lossless encoding, transparency, and animation.

Feature WebP AVIF
Extension .webp .avif
MIME Type image/webp image/avif
Lossy Yes Yes
Lossless Yes Yes
Transparency Yes Yes
Animation Yes Yes
Typical Use General modern web imagery High-efficiency modern web imagery
Modern Formats Can Reduce Delivery Size

WebP and AVIF can often achieve useful image quality at smaller transfer sizes than older formats in comparable workflows. Actual results depend on the source image, encoder, settings, and desired output quality.

Keep Workflow Compatibility in Mind

Browser support for WebP and AVIF is now broad in modern browsers, but software, editing tools, content-management systems, and older devices can differ. Compatibility requirements still matter when selecting a delivery format.

Scalable Vector Graphics

SVG

SVG is different from JPEG, PNG, WebP, and most other image formats because it is primarily vector-based. An SVG file contains XML markup describing shapes, paths, text, fills, gradients, filters, and other drawing instructions.

Extension .svg
MIME Type image/svg+xml
Image Type Vector
Transparency Yes
Scaling Resolution-independent drawing
Good For Logos, icons, diagrams, charts, illustrations
Less Suitable For Ordinary complex photographic imagery
SVG Can Stay Sharp at Different Sizes

Because shapes are reconstructed from vector instructions, an SVG logo or icon can generally be rendered at small or large dimensions without the normal pixelation caused by enlarging a fixed-size raster image.

SVG Is Also Code-Like Content

SVG is XML-based and can contain more structure than an ordinary bitmap image. Security handling for untrusted SVG files therefore differs from simple raster formats in some applications and contexts.

Photography, Print & Legacy

HEIC, TIFF, BMP, ICO & RAW

Several important image formats are common outside everyday web delivery. They appear frequently in phone photography, professional imaging, print production, operating systems, icon sets, scanning, and camera workflows.

Format Extension Typical Use Notes
HEIC / HEIF .heic, .heif High-efficiency photography Common on phones and modern imaging systems
TIFF .tif, .tiff Scanning, print, archival Flexible format supporting several image representations
BMP .bmp Legacy bitmap graphics Simple format with relatively inefficient storage in many uses
ICO .ico Icons and favicons Can contain multiple image sizes and representations
JPEG XL .jxl Advanced raster imaging Supports lossy/lossless, HDR, alpha, and other modern features
Canon RAW .cr2, .cr3 Camera capture Manufacturer-specific RAW formats
Nikon RAW .nef Camera capture Manufacturer-specific RAW format
Sony RAW .arw Camera capture Manufacturer-specific RAW format
Adobe DNG .dng Digital photography Raw-image container designed for broader interchange
RAW Is a Category, Not One File Format

Camera RAW files preserve minimally processed sensor-related image data for editing workflows. Different camera makers use different formats and extensions, so there is no single universal .raw format that represents every camera RAW file.

HEIC vs HEIF

HEIF is a high-efficiency image container framework. HEIC is a common filename extension associated with HEIF images encoded using HEVC. The terms are often used interchangeably in everyday discussion, but they describe related rather than perfectly identical concepts.

Format Comparison

Common Image Format Profiles

These six formats cover many common image workflows, from photography and screenshots to optimized web delivery and scalable graphics.

JPEG Photography

Lossy raster compression, excellent compatibility, no alpha transparency.

PNG Lossless

Useful for screenshots, interface graphics, sharp edges, and alpha transparency.

WebP Modern Web

Lossy or lossless compression with transparency and animation support.

AVIF Efficient Raster

Modern format with efficient compression, transparency, HDR-related features, and animation.

SVG Vector

Scalable XML-based graphics ideal for logos, icons, diagrams, and illustrations.

HEIC Photography

High-efficiency image storage common in modern phone and photography workflows.

Practical Selection

Which Image Format Should You Use?

There is no single best image format for every job. Choose based on the type of image, desired quality, transparency or animation requirements, editing workflow, compatibility, and delivery size.

Use Case Good Choices Why
Photographs on the web AVIF, WebP, JPEG Efficient lossy compression and broad delivery options
Maximum compatibility photograph JPEG Very widely supported across software and devices
Screenshot or UI graphic PNG, WebP, AVIF Sharp edges and lossless options
Transparent raster graphic PNG, WebP, AVIF Alpha transparency support
Logo or icon SVG Scales cleanly at many output sizes
Simple animation WebP, AVIF, APNG, GIF Multiple frames; compatibility needs vary
Phone photography storage HEIC / HEIF Efficient modern photography storage
Print / scan workflow TIFF, PNG High-quality and lossless workflow options
Camera editing master RAW / DNG Preserves capture data for post-processing

Modern Web Delivery

The HTML <picture> element can provide several image sources so a browser can select a supported format while retaining a fallback.

Example Strategy

A site could offer an AVIF source first, WebP second, and a conventional JPEG or PNG image as the fallback. The exact combination should reflect the site's actual compatibility needs.

Renaming Does Not Convert an Image

Changing photo.jpg to photo.png does not transform the JPEG image data into PNG. Use an image editor, converter, export tool, command-line utility, or other software that can decode the original and encode the destination format.

FAQ

Image Format Questions

Are JPG and JPEG the same format?

Yes. .jpg and .jpeg normally identify the same JPEG image format. The shorter extension became common on older systems that favored three-character extensions.

Which image format is best for photographs?

JPEG remains widely compatible for photographs. WebP and AVIF provide modern compression options for web delivery. The best choice depends on quality, file size, software support, and compatibility.

Which image formats support transparency?

PNG, WebP, AVIF, and SVG support transparency. GIF supports more limited transparency. Standard JPEG does not provide an alpha transparency channel.

What is the difference between WebP and AVIF?

Both are modern formats supporting lossy and lossless compression, transparency, and animation. AVIF can provide very efficient compression and advanced image features, while WebP has broad modern browser and software support.

Is SVG a raster image format?

No. SVG is a vector format based on XML. It describes shapes, paths, text, and drawing instructions instead of primarily storing a fixed grid of image pixels.

Are HEIC and HEIF the same thing?

They are closely related but not exactly identical. HEIF is a high-efficiency image container framework, while HEIC commonly refers to HEIF images encoded using HEVC.

Does changing an image file extension convert the image?

No. Renaming image.jpg to image.png changes only the filename. Proper conversion requires software to decode the original file and encode or save a new image in the destination format.