fix: switch to webp by default

This commit is contained in:
James Xylight committed 2025-07-15 12:35:41 -07:00
1 parent 9094dd7758
commit ca9b0f013f
1 file changed
+2 -2
+2 -2
View File
@@ -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)