Apply per-use-case image size configs (#10690)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Eric Bailey
2026-06-04 11:23:04 -05:00
committed by GitHub
parent 66db349ef2
commit 795d493dea
14 changed files with 141 additions and 101 deletions
+2 -1
View File
@@ -19,6 +19,7 @@ import {msg} from '@lingui/core/macro'
import {useLingui} from '@lingui/react'
import {Trans} from '@lingui/react/macro'
import {IMAGE_SIZE_CONFIG_2K_1MB} from '#/lib/constants'
import {usePhotoLibraryPermission} from '#/lib/hooks/usePermissions'
import {compressIfNeeded} from '#/lib/media/manip'
import {openCropper} from '#/lib/media/picker'
@@ -212,7 +213,7 @@ export function StepProfile() {
}
}
}
image = await compressIfNeeded(image, 1000000)
image = await compressIfNeeded(image, IMAGE_SIZE_CONFIG_2K_1MB)
// If we are on mobile, prefetching the image will load the image into memory before we try and display it,
// stopping any brief flickers.