From b6b43a76ee6b79d936cfe926a800490c8a9dabce Mon Sep 17 00:00:00 2001 From: Oleksandr Prokhorenko Date: Thu, 30 Nov 2023 14:02:34 +0100 Subject: [PATCH] feat: propose adr to use webp (#167) * Create 0004-webp.md * Update 0004-webp.md * Update 0004-webp.md * Update 0004-webp.md --- .../09_architecture_decisions/0004-webp.md | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 docs/src/architecture/09_architecture_decisions/0004-webp.md diff --git a/docs/src/architecture/09_architecture_decisions/0004-webp.md b/docs/src/architecture/09_architecture_decisions/0004-webp.md new file mode 100644 index 00000000000..8c42116fb6a --- /dev/null +++ b/docs/src/architecture/09_architecture_decisions/0004-webp.md @@ -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)