compress uploaded images and cache proxied files

Photos from iPhone (3-10 MB, 12-24 MP) were stored and served as-is, so the
feed loaded slowly on first open. Images are now downscaled to 1600px,
rotated by EXIF and re-encoded as progressive JPEG on upload. The
/api/v1/files proxy now sends Cache-Control instead of Spring Security's
no-store, so images are not re-downloaded on every app open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
SlimusMinus
2026-10-19 23:43:07 +03:00
parent 91ceafe75b
commit a564e6f97d
5 changed files with 266 additions and 7 deletions

View File

@@ -52,6 +52,11 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'io.minio:minio:8.6.0'
// Сжатие картинок при загрузке: ресайз + поворот по EXIF, чтение WebP/CMYK-JPEG
implementation 'net.coobird:thumbnailator:0.4.20'
implementation 'com.twelvemonkeys.imageio:imageio-jpeg:3.12.0'
implementation 'com.twelvemonkeys.imageio:imageio-webp:3.12.0'
// JWT
implementation 'io.jsonwebtoken:jjwt-api:0.12.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.5'