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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user