diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-12-26 12:01:40 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-26 12:01:40 -0600 |
commit | 838fc601c1f89f028862212d169aebe4163c8672 (patch) | |
tree | e00dd942ea0b07f1560e4580c6f273a746c4808c /src/state/lib/api.ts | |
parent | 8652b74a38f67e7f88890c9c3eb3be090b53462c (diff) | |
download | voidsky-838fc601c1f89f028862212d169aebe4163c8672.tar.zst |
Start with highest quality compression and find a suitable size (#33)
Diffstat (limited to 'src/state/lib/api.ts')
-rw-r--r-- | src/state/lib/api.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/state/lib/api.ts b/src/state/lib/api.ts index f0f33d134..31df20468 100644 --- a/src/state/lib/api.ts +++ b/src/state/lib/api.ts @@ -14,7 +14,7 @@ import {AtUri} from '../../third-party/uri' import {RootStoreModel} from '../models/root-store' import {extractEntities} from '../../lib/strings' import {isNetworkError} from '../../lib/errors' -import {downloadAndResize} from '../../lib/download' +import {downloadAndResize} from '../../lib/images' import {getLikelyType, LikelyType, getLinkMeta} from '../../lib/link-meta' const TIMEOUT = 10e3 // 10s @@ -85,6 +85,7 @@ export async function post( width: 250, height: 250, mode: 'contain', + maxSize: 100000, timeout: 15e3, }).catch(() => undefined) if (thumbLocal) { |