From ca9b0f013f489109fe6380826167e063704ea30a Mon Sep 17 00:00:00 2001 From: James Xylight Date: Tue, 15 Jul 2025 12:35:41 -0700 Subject: [PATCH] fix: switch to webp by default --- src/lib/components/lemmy/post/helpers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/lemmy/post/helpers.ts b/src/lib/components/lemmy/post/helpers.ts index 5dd670a9..510671d6 100644 --- a/src/lib/components/lemmy/post/helpers.ts +++ b/src/lib/components/lemmy/post/helpers.ts @@ -12,7 +12,7 @@ export const bestImageURL = ( post: Post, thumbnail: boolean = true, width: number = 1024, - format: 'avif' | 'webp' | null = 'avif', + format: 'avif' | 'webp' | null = 'webp', ) => { if (post.thumbnail_url && (thumbnail || !post.url)) return optimizeImageURL(post.thumbnail_url, width, format) @@ -24,7 +24,7 @@ export const bestImageURL = ( export const optimizeImageURL = ( urlStr: string, width: number = 1024, - format: 'avif' | 'webp' | null = 'avif', + format: 'avif' | 'webp' | null = 'webp', ): string => { try { const url = new URL(urlStr)