1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-07 21:37:04 +09:00

GO-2078: add some docs about images

Signed-off-by: AnastasiaShemyakinskaya <shem98a@mail.ru>
This commit is contained in:
AnastasiaShemyakinskaya 2023-12-11 15:27:18 +03:00
parent dd082c2f97
commit 4e32f957e5
No known key found for this signature in database
GPG key ID: CCD60ED83B103281

42
docs/Images.md Normal file
View file

@ -0,0 +1,42 @@
### Middleware
Middleware supports following formats of images:
1. png
2. jpg
3. jpeg
4. webp
5. ico
6. svg
7. gif
* Currently, if we want to get image with size > 1920, we take original image, not resized. So it leads to a case,
when images like heic and ico are returned in original format. But in case client asked for image with size < 1920, then
heic is decoded as jpeg and ico as png.
* SVG image is saved as usual file, but we return it as image in gateway to support SVG icons for objects. Also for SVG file we create image block,
despite the fact, that it's saved as file.
* All images are saved with following structure in DAG
1. Original
2. Small
3. Thumb
4. Exif
5. Large
### Desktop
1. png
2. jpg
3. jpeg
4. webp
5. svg
6. gif
### IOS
1. png
2. jpg
3. jpeg
4. bmp
5. tiff
6. gif
7. ico
8. cur
9. xbm