From 1a0d7079ad12e3136734a72533a6a8fabd116ee6 Mon Sep 17 00:00:00 2001 From: dab246 Date: Thu, 28 Jul 2022 15:02:47 +0700 Subject: [PATCH] TF-761 Add `adr` for down size of base64 --- docs/adr/0011-down-size-of-base64-image.md | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 docs/adr/0011-down-size-of-base64-image.md diff --git a/docs/adr/0011-down-size-of-base64-image.md b/docs/adr/0011-down-size-of-base64-image.md new file mode 100644 index 000000000..840890308 --- /dev/null +++ b/docs/adr/0011-down-size-of-base64-image.md @@ -0,0 +1,23 @@ +# 11. down-size-of-base64-image + +Date: 2022-07-28 + +## Status + +Accepted + +## Context + +For large images (several MB or more) converting to base64 will take a long time and exceed the storage limit of the string. +Leads to long waits on the main thread, causing a feeling of not being smooth on mobile devices with weak configuration. + +## Decision + +We can reduce the image `size` and `quality` when displaying. +- For mobile: + + Use [flutter_image_compress](https://pub.dev/packages/flutter_image_compress) to compress image use native (Objective-C/Kotlin) with faster speed. + +## Consequences + +- The size of the image has been significantly reduced with the display quality not much different from the original image. +- Faster processing speed.