reduce image size to proritize sealed loading

This commit is contained in:
Roland Osborne 2023-05-04 13:37:11 -07:00
parent 53d827a12e
commit c205cec28c

View File

@ -129,7 +129,7 @@ export function useAddTopic(contentKey) {
addImage: async (data) => {
assetId.current++;
const asset = await setAsset(data, async (file) => {
const scaled = await ImageResizer.createResizedImage(file, 1024, 1024, "JPEG", 50, 0, null);
const scaled = await ImageResizer.createResizedImage(file, 512, 512, "JPEG", 90, 0, null);
return `file://${scaled.path}`;
});
asset.key = assetId.current;