Use compressorjs-next

This commit is contained in:
Jon Staab
2026-02-16 11:34:46 -08:00
parent 3d268f1f9d
commit c9954db3fe
4 changed files with 10 additions and 25 deletions
+1 -2
View File
@@ -7,7 +7,6 @@
import CloseCircle from "@assets/icons/close-circle.svg?dataurl"
import Magnifier from "@assets/icons/magnifier.svg?dataurl"
import {fly} from "@lib/transition"
import PageContent from "@lib/components/PageContent.svelte"
import Button from "@lib/components/Button.svelte"
import Icon from "@lib/components/Icon.svelte"
import {deriveEventsForUrl} from "@app/core/state"
@@ -92,7 +91,7 @@
const onRoomSearchResultClick = (event: TrustedEvent) => {
close()
void goToEvent(event, {keepFocus: true})
goToEvent(event, {keepFocus: true})
}
</script>
+2 -2
View File
@@ -140,13 +140,13 @@ export const compressFile = async (
file: File | Blob,
options: Record<string, any> = {},
): Promise<File> => {
const {default: Compressor} = await import("compressorjs")
const {default: Compressor} = await import("compressorjs-next")
return new Promise<File>((resolve, _reject) => {
new Compressor(file, {
maxWidth: 2048,
maxHeight: 2048,
convertSize: 10 * 1024 * 1024,
convertTypes: ["image/png"],
...options,
success: result => resolve(result as File),
error: e => {