Skip to content

Commit 43eb06b

Browse files
committed
feat(compression): compressed metadata images
When the MetadataImageService gets a request, try and fetch the image form an in memory cache. If not present, fetch from Supabase and compress the image using sharp. Opted for compressions with webp as that should be nice for web images. Proof of concept
1 parent 12038fc commit 43eb06b

File tree

3 files changed

+333
-11
lines changed

3 files changed

+333
-11
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,12 @@
6767
"lru-cache": "^11.0.0",
6868
"mime-types": "^2.1.35",
6969
"multer": "1.4.5-lts.1",
70+
"node-cache": "^5.1.2",
7071
"node-cron": "^3.0.3",
7172
"pg": "^8.12.0",
7273
"reflect-metadata": "^0.2.2",
7374
"rollup": "^4.12.0",
75+
"sharp": "^0.33.5",
7476
"swagger-ui-express": "^5.0.0",
7577
"tsoa": "^6.2.1",
7678
"tsyringe": "^4.8.0",

0 commit comments

Comments
 (0)