diff --git a/src/routes/(console)/project-[region]-[project]/sites/(components)/siteCard.svelte b/src/routes/(console)/project-[region]-[project]/sites/(components)/siteCard.svelte index e8eb7e0150..d5c0e5ed88 100644 --- a/src/routes/(console)/project-[region]-[project]/sites/(components)/siteCard.svelte +++ b/src/routes/(console)/project-[region]-[project]/sites/(components)/siteCard.svelte @@ -2,7 +2,7 @@ import { Card } from '$lib/components/index.js'; import { humanFileSize } from '$lib/helpers/sizeConvertion'; import { formatTimeDetailed } from '$lib/helpers/timeConversion'; - import type { Models } from '@appwrite.io/console'; + import { ImageFormat, type Models } from '@appwrite.io/console'; import { page } from '$app/state'; import { Badge, @@ -46,7 +46,23 @@ } function getFilePreview(fileId: string) { - return sdk.forConsoleIn(page.params.region).storage.getFileView('screenshots', fileId); + return sdk + .forConsoleIn(page.params.region) + .storage.getFilePreview( + 'screenshots', + fileId, + 1024, + 576, + undefined, + undefined, + undefined, + undefined, + undefined, + undefined, + undefined, + undefined, + ImageFormat.Webp + ); } diff --git a/src/routes/(console)/project-[region]-[project]/sites/grid.svelte b/src/routes/(console)/project-[region]-[project]/sites/grid.svelte index 36b12b5628..8621aa9ef9 100644 --- a/src/routes/(console)/project-[region]-[project]/sites/grid.svelte +++ b/src/routes/(console)/project-[region]-[project]/sites/grid.svelte @@ -2,7 +2,7 @@ import { base } from '$app/paths'; import { page } from '$app/state'; import { timeFromNow } from '$lib/helpers/date'; - import type { Models } from '@appwrite.io/console'; + import { ImageFormat, type Models } from '@appwrite.io/console'; import { Card, Icon, Layout, Popover, Tooltip, Typography } from '@appwrite.io/pink-svelte'; import { generateSiteDeploymentDesc } from './store'; import { SvgIcon } from '$lib/components'; @@ -33,7 +33,23 @@ } function getFilePreview(fileId: string) { - return sdk.forConsoleIn(page.params.region).storage.getFileView('screenshots', fileId); + return sdk + .forConsoleIn(page.params.region) + .storage.getFilePreview( + 'screenshots', + fileId, + 1024, + 576, + undefined, + undefined, + undefined, + undefined, + undefined, + undefined, + undefined, + undefined, + ImageFormat.Webp + ); }