Skip to content

Commit 2dbdb5b

Browse files
committed
chore: change image output format from Webp to Avif
Use AVIF over WebP because it results in a smaller file
1 parent 310f86b commit 2dbdb5b

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

src/routes/(console)/project-[region]-[project]/sites/(components)/siteCard.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
fileId,
5252
width: 1024,
5353
height: 576,
54-
output: ImageFormat.Webp
54+
output: ImageFormat.Avif
5555
});
5656
}
5757
</script>

src/routes/(console)/project-[region]-[project]/sites/grid.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
fileId,
3939
width: 1024,
4040
height: 576,
41-
output: ImageFormat.Webp
41+
output: ImageFormat.Avif
4242
});
4343
}
4444
</script>

src/routes/(console)/project-[region]-[project]/storage/bucket-[bucket]/+page.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import { Button } from '$lib/elements/forms';
1010
import { calculateSize } from '$lib/helpers/sizeConvertion';
1111
import { Container } from '$lib/layout';
12-
import type { Models } from '@appwrite.io/console';
12+
import { ImageFormat, type Models } from '@appwrite.io/console';
1313
import { addNotification } from '$lib/stores/notifications';
1414
import { uploader } from '$lib/stores/uploader';
1515
import { sdk } from '$lib/stores/sdk.js';
@@ -53,7 +53,8 @@
5353
bucketId,
5454
fileId,
5555
height: 128,
56-
width: 128
56+
width: 128,
57+
output: ImageFormat.Avif
5758
})
5859
.toString() + '&mode=admin'
5960
);

src/routes/(console)/project-[region]-[project]/storage/bucket-[bucket]/file-[file]/+page.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
} from '@appwrite.io/pink-icons-svelte';
3636
import FileTokensCopyUrl from './fileTokensCopyUrl.svelte';
3737
import ManageFileTokenModal, { cleanFormattedDate } from './manageFileToken.svelte';
38-
import { type Models } from '@appwrite.io/console';
38+
import { ImageFormat, type Models } from '@appwrite.io/console';
3939
import { isSmallViewport } from '$lib/stores/viewport';
4040
import { Menu } from '$lib/components/menu';
4141
@@ -57,7 +57,8 @@
5757
bucketId: $file.bucketId,
5858
fileId,
5959
width: 640,
60-
height: 300
60+
height: 300,
61+
output: ImageFormat.Avif
6162
})
6263
.toString() + '&mode=admin';
6364
const getView = (fileId: string) =>

0 commit comments

Comments
 (0)