misc: appropriately size images

This commit is contained in:
Xylight committed 2024-07-07 13:01:09 -07:00
1 parent ad3b9e5f36
commit 6bc3c0bd94
2 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -3,7 +3,7 @@
import { createAvatar } from '@dicebear/core'
import * as initials from '@dicebear/initials'
const sizes = [48, 64, 128, 256, 512]
const sizes = [16, 32, 48, 64, 128, 256, 512]
export let url: string | undefined
export let alt: string = ''
@@ -21,7 +21,7 @@
urlObj.searchParams.append('format', 'webp')
urlObj.searchParams.append(
'thumbnail',
findClosestNumber(sizes, (res || width) * 2).toString()
findClosestNumber(sizes, res || width).toString()
)
return urlObj.toString()