misc: double image size
This commit is contained in:
1 parent
09eb3b80c2
commit
1e78fa4180
3 files changed
+8
-8
No files matched your search
@@ -18,12 +18,12 @@ export const bestImageURL = (
|
||||
}
|
||||
|
||||
if (compact && post.thumbnail_url)
|
||||
return `${post.thumbnail_url}?thumbnail=256&format=webp`
|
||||
else if (compact && post.url) return `${post.url}?thumbnail=256&format=webp`
|
||||
return `${post.thumbnail_url}?thumbnail=512&format=webp`
|
||||
else if (compact && post.url) return `${post.url}?thumbnail=512&format=webp`
|
||||
|
||||
if (post.url) return `${post.url}?thumbnail=${width}&format=webp`
|
||||
if (post.url) return `${post.url}?thumbnail=${width * 2}&format=webp`
|
||||
else if (post.thumbnail_url)
|
||||
return `${post.thumbnail_url}?thumbnail=${width}&format=webp`
|
||||
return `${post.thumbnail_url}?thumbnail=${width * 2}&format=webp`
|
||||
|
||||
return post.url ?? ''
|
||||
}
|
||||
@@ -37,7 +37,7 @@ export const optimizeImageURL = (
|
||||
url.searchParams.append('format', 'webp')
|
||||
url.searchParams.append(
|
||||
'thumbnail',
|
||||
findClosestNumber([128, 256, 512, 1024], width).toString()
|
||||
findClosestNumber([128, 256, 512, 1024], width * 2).toString()
|
||||
)
|
||||
return url.toString()
|
||||
} catch (e) {
|
||||
|
||||
Reference in new issue
Block a user