From 24c96ac881260c8684f8addb81f6e566d538a515 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Fri, 14 Nov 2025 17:46:39 +0200 Subject: [PATCH] Image saving - fix extension, increase download timeout (#9388) --- src/lib/media/manip.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lib/media/manip.ts b/src/lib/media/manip.ts index c955fe3857..7571f2972d 100644 --- a/src/lib/media/manip.ts +++ b/src/lib/media/manip.ts @@ -84,14 +84,14 @@ export async function shareImageModal({uri}: {uri: string}) { return } - // we're currently relying on the fact our CDN only serves pngs + // we're currently relying on the fact our CDN only serves jpegs // -prf - const imageUri = await downloadImage(uri, createPath('png'), 5e3) - const imagePath = await moveToPermanentPath(imageUri, '.png') + const imageUri = await downloadImage(uri, createPath('jpg'), 15e3) + const imagePath = await moveToPermanentPath(imageUri, '.jpg') safeDeleteAsync(imageUri) await Sharing.shareAsync(imagePath, { - mimeType: 'image/png', - UTI: 'image/png', + mimeType: 'image/jpeg', + UTI: 'image/jpeg', }) } @@ -100,11 +100,11 @@ const ALBUM_NAME = 'Bluesky' export async function saveImageToMediaLibrary({uri}: {uri: string}) { // download the file to cache // NOTE - // assuming PNG - // we're currently relying on the fact our CDN only serves pngs + // assuming JPEG + // we're currently relying on the fact our CDN only serves jpegs // -prf - const imageUri = await downloadImage(uri, createPath('png'), 5e3) - const imagePath = await moveToPermanentPath(imageUri, '.png') + const imageUri = await downloadImage(uri, createPath('jpg'), 15e3) + const imagePath = await moveToPermanentPath(imageUri, '.jpg') // save try {