about summary refs log tree commit diff
path: root/src/lib/api
diff options
context:
space:
mode:
authorOllie H <renahlee@outlook.com>2023-05-30 17:23:55 -0700
committerGitHub <noreply@github.com>2023-05-30 19:23:55 -0500
commit072682dd9f8843787229a98fbeea24161bc0c9b4 (patch)
tree931c55dd298e36e363bb0366f41d671043f091ba /src/lib/api
parentdeebe18aaa883d7fcedabd594dda057f991c3026 (diff)
downloadvoidsky-072682dd9f8843787229a98fbeea24161bc0c9b4.tar.zst
Rework scaled dimensions and compression (#737)
* Rework scaled dimensions and compression

* Unbreak image / banner uploads

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src/lib/api')
-rw-r--r--src/lib/api/index.ts1
1 files changed, 1 insertions, 0 deletions
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({