[APP-1968] Increase image upload resolution (#10073)

This commit is contained in:
Eric Bailey
2026-03-20 11:22:36 -05:00
committed by GitHub
parent 5bcb909081
commit 34d8c6fe58
6 changed files with 61 additions and 10 deletions
+16 -2
View File
@@ -200,10 +200,24 @@ export function resetImageManipulation(
return img
}
export async function compressImage(img: ComposerImage): Promise<PickerImage> {
export async function compressImage(
img: ComposerImage,
options?: {
highResolution?: boolean
},
): Promise<PickerImage> {
const source = img.transformed || img.source
const [w, h] = containImageRes(source.width, source.height, POST_IMG_MAX)
const [w, h] = containImageRes(
source.width,
source.height,
options?.highResolution
? {
width: 4000,
height: 4000,
}
: POST_IMG_MAX,
)
let minQualityPercentage = 0
let maxQualityPercentage = 101 // exclusive