Skip to content

0004 Store/Display images in WebP format.

Author:
Oleksandr Prokhorenko
Created:
2023-11-30
Status:
Proposed
Tags:

Context

As we develop our new cross-platform application (supporting Web, iOS, Android, macOS, Windows, and Linux), we face a decision regarding the choice of image format. The selection of an image format is critical for optimizing performance, load times, and the overall user experience across diverse platforms.

Assumptions

  • The WebP format will be adequately supported across all targeted platforms.
  • Adoption of WebP will yield significant benefits in terms of performance and user experience.
  • Our development and design teams will adapt to using WebP without significant challenges.

Decision

We propose to adopt WebP as our standard image format for both web and native applications. This decision is based on several advantages of WebP over JPG and PNG:

  • Superior Compression: WebP provides better compression than JPG and PNG, allowing images to be significantly smaller in size without a noticeable loss in quality. This leads to faster loading times and reduced bandwidth usage, which is particularly beneficial for mobile users.

  • Support for Transparency: Unlike JPG and capable of more efficient transparency handling than PNG, WebP supports transparent backgrounds, which is essential for various design elements.

  • Improved Performance: The smaller file size of WebP directly translates to quicker image loading and rendering, contributing to a smoother user experience.

  • Versatility: WebP is versatile, supporting both lossy and lossless compression, making it suitable for a wide range of image types – from photographic images to graphical designs.

  • Future-Proofing: As a modern format, WebP is increasingly supported by new browsers and platforms, making it a future-proof choice.

Risks

  • Some older browsers or platforms might have limited or no support for WebP, necessitating fallback solutions.
  • The development team may need to overcome a learning curve associated with handling a new image format.

Consequences

  • Enhanced application performance across all platforms due to reduced image sizes.
  • Improved loading times, especially critical for mobile users with limited bandwidth.
  • Potential for initial development overhead as tools and processes are adapted for WebP.

More Information