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

@@ -49,7 +49,7 @@ class FileStorageServicePresignedUrlTest {
MinioProperties properties = mock(MinioProperties.class);
when(properties.bucket()).thenReturn("bucket");
service = new FileStorageService(mock(S3Client.class), presigner, properties, redis);
service = new FileStorageService(mock(S3Client.class), presigner, properties, redis, new ImageOptimizer());
}
@Test