ツバサのメモ帳
JPEG vs PNG vs WebP vs RAW: Image File Formats Explained

JPEG vs PNG vs WebP vs RAW: Image File Formats Explained

Choosing the right image format is one of those decisions that seems trivial until you get it wrong — a product photo with compression artifacts, a logo with a white box instead of a transparent background, a page that loads slowly because every image is an uncompressed PNG. This guide covers the six formats you will encounter most often and when to use each one.

Quick Comparison Table

FormatCompressionTransparencyAnimationBest For
JPEGLossyNoNoPhotographs, product photos
PNGLosslessYesNoLogos, icons, screenshots, graphics with text
WebPBothYesYesWeb images (modern replacement for JPEG/PNG/GIF)
GIFLossless (256 colors)Yes (binary)YesSimple animations, memes
RAWNone / losslessNoNoPhotography editing (not for web)
HEICLossyNoNoiPhone photos (storage-efficient alternative to JPEG)

JPEG

JPEG (Joint Photographic Experts Group, 1992) is the most widely used image format in the world. It uses lossy compression — meaning it permanently discards some image data to reduce file size. At high quality settings (80-95%), the visual difference from the original is imperceptible to most people. At low quality settings, compression artifacts become visible as blocky patterns, especially around sharp edges and text.

Strengths: Universally supported everywhere — browsers, phones, email, social media, printers. Excellent compression ratio for photographs. Small file sizes make pages load faster.

Weaknesses: No transparency support. Each time you open, edit, and re-save a JPEG, quality degrades (generation loss). Not suitable for graphics with sharp edges, text, or flat colors — these show compression artifacts clearly.

When to use: Photographs, product photos on solid backgrounds, hero images, social media posts. JPEG is the default choice for any photograph that does not need transparency.

PNG

PNG (Portable Network Graphics, 1996) was designed as a patent-free replacement for GIF. It uses lossless compression — no data is discarded, so the image quality is identical to the original. PNG supports full alpha transparency, meaning pixels can be partially transparent (smooth edges against any background).

Strengths: Lossless quality. Full transparency support. Excellent for graphics with sharp lines, text, flat colors, and screenshots. No quality loss on re-saving.

Weaknesses: Larger file sizes than JPEG for photographs (often 5-10x larger). Not suitable for photographs where file size matters. No animation support (APNG exists but has limited adoption).

When to use: Logos, icons, illustrations, screenshots, any image that needs a transparent background. Product photos that will be placed on colored or patterned backgrounds in a page layout.

WebP

WebP (developed by Google, 2010) is a modern format that combines the best features of JPEG, PNG, and GIF. It supports lossy compression (like JPEG), lossless compression (like PNG), transparency, and animation — all in one format. At equivalent visual quality, WebP files are typically 25-35% smaller than JPEG and significantly smaller than PNG.

Strengths: Smaller files than JPEG at the same quality. Supports transparency and animation. Browser support is now near-universal (Chrome, Firefox, Safari, Edge all support it as of 2024).

Weaknesses: Some older image editing software does not support it natively. Email clients may not display WebP attachments correctly. Some e-commerce marketplaces still require JPEG or PNG.

When to use: WebP is the best default for website images in 2026. Use it wherever browser compatibility is not a concern. For maximum compatibility (email, older systems, marketplace listings), keep JPEG or PNG as fallback.

GIF

GIF (Graphics Interchange Format, 1987) is the oldest format on this list and is technically outdated by every measure — but it persists because of its animation support and cultural role in memes and messaging. GIF is limited to 256 colors, which makes it unsuitable for photographs. Its transparency support is binary (a pixel is either fully transparent or fully opaque — no smooth edges).

When to use: Simple animations and memes where file size is not a priority and broad compatibility matters (messaging apps, forums). For anything else, WebP or PNG is a better choice.

RAW

RAW is not a single format but a category of proprietary formats (Canon CR3, Nikon NEF, Sony ARW, etc.) that save the unprocessed data from a camera sensor. RAW files are large, not web-compatible, and require specialized software to open. They exist for one purpose: giving photographers maximum control over editing.

When to use: Photography workflow only. Shoot in RAW, edit in Lightroom or Capture One, then export as JPEG or WebP for the web. Never upload RAW files to websites or social media.

HEIC

HEIC (High Efficiency Image Container) is the default photo format on iPhones since iOS 11 (2017). It uses the HEVC video codec for compression, producing files roughly half the size of equivalent JPEGs at similar quality. This saves significant storage on phones with limited capacity.

The catch: Compatibility outside the Apple ecosystem is inconsistent. Windows requires a codec extension to view HEIC files. Many web platforms and e-commerce marketplaces do not accept HEIC uploads. If you share photos frequently or upload to websites, set your iPhone to save as JPEG instead (Settings → Camera → Formats → Most Compatible).

How to Choose: A Practical Summary

Your SituationUse This Format
Photo for a website or blogWebP (with JPEG fallback)
Product photo for e-commerceJPEG (universally accepted by marketplaces)
Logo or iconPNG (or SVG for vector)
ScreenshotPNG
Social media postJPEG (platforms compress on upload anyway)
Animated contentWebP or MP4 video (GIF only if compatibility is critical)
Photography editingRAW → export to JPEG/WebP
Saving space on iPhoneHEIC (default) — convert to JPEG when sharing

FAQ

When should I use JPEG vs PNG?

Use JPEG for photographs and images with complex colors and gradients. JPEG compresses well and produces small files, but does not support transparency. Use PNG when you need transparency (logos, icons, product images on non-white backgrounds), or for screenshots and graphics with sharp edges and text where JPEG compression artifacts would be visible.

What is WebP and is it better than JPEG?

WebP is a modern format developed by Google that offers both lossy and lossless compression. At the same visual quality, WebP files are typically 25-35% smaller than JPEG. WebP also supports transparency (like PNG) and animation (like GIF). Browser support is now near-universal, making WebP a strong default for web images in 2026.

What is the best image format for e-commerce product photos?

For product photos on white backgrounds, JPEG is the standard — it is universally supported, produces small files, and handles photographs well. If your product images need transparency, use PNG. For websites where performance matters, consider WebP with JPEG fallback. Amazon, Shopify, and most marketplaces accept JPEG and PNG.

When should I use RAW?

RAW is for photography, not for the web. Shoot in RAW when you plan to edit your photos in software like Lightroom or Capture One and need maximum flexibility for adjusting exposure, white balance, and color. RAW files must be converted to JPEG, PNG, or WebP before uploading to websites or social media.

Is GIF still used in 2026?

GIF is still used for simple animations and memes, but it is technically outdated. GIF supports only 256 colors, no transparency with smooth edges, and produces large files for animations. For animated content, WebP and AVIF offer better quality at smaller sizes. For static images, PNG or WebP are better choices in every scenario.

How do I convert HEIC photos from iPhone to JPEG?

On iPhone, go to Settings → Camera → Formats and select "Most Compatible." This makes the camera save new photos as JPEG instead of HEIC. For existing HEIC files, sharing them via email or AirDrop to a non-Apple device often converts them automatically. On Mac, open in Preview and export as JPEG. On Windows, the HEIF Image Extensions from the Microsoft Store enable native HEIC viewing and conversion.

🇯🇵 この記事の日本語版はこちら(Japanese version)

Tsubasa

Tsubasa

I work in e-commerce in Japan. This site is a collection of notes on things I've researched. I can use Photoshop a little but prefer smartphone apps for quick edits. For anything beyond basic adjustments, I outsource to professional retouchers.