-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: propose adr to use webp (#167)
* Create 0004-webp.md * Update 0004-webp.md * Update 0004-webp.md * Update 0004-webp.md
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
docs/src/architecture/09_architecture_decisions/0004-webp.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
title: 0004 Store/Display images in WebP format. | ||
adr: | ||
author: Oleksandr Prokhorenko | ||
created: 30-Nov-2023 | ||
status: proposed | ||
tags: | ||
- images | ||
--- | ||
|
||
## 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 | ||
|
||
* [WebP Comparison with Other Formats](https://developers.google.com/speed/webp/docs/webp_study) | ||
* [Browser Support for WebP](https://caniuse.com/webp) |