From 072682dd9f8843787229a98fbeea24161bc0c9b4 Mon Sep 17 00:00:00 2001 From: Ollie H Date: Tue, 30 May 2023 17:23:55 -0700 Subject: Rework scaled dimensions and compression (#737) * Rework scaled dimensions and compression * Unbreak image / banner uploads --------- Co-authored-by: Paul Frazee --- src/lib/api/index.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'src/lib/api/index.ts') diff --git a/src/lib/api/index.ts b/src/lib/api/index.ts index 81b61a444..6235ca343 100644 --- a/src/lib/api/index.ts +++ b/src/lib/api/index.ts @@ -110,6 +110,7 @@ export async function post(store: RootStoreModel, opts: PostOpts) { const images: AppBskyEmbedImages.Image[] = [] for (const image of opts.images) { opts.onStateChange?.(`Uploading image #${images.length + 1}...`) + await image.compress() const path = image.compressed?.path ?? image.path const res = await uploadBlob(store, path, 'image/jpeg') images.push({ -- cgit 1.4.1