lib image typing fix
This commit is contained in:
1 parent
bec9bb2f03
commit
c3b809cc72
1 file changed
-3
@@ -6,9 +6,6 @@ export type ResizeOptions = {
|
|||||||
|
|
||||||
export function getResizedUrl(src: string, options: ResizeOptions): string {
|
export function getResizedUrl(src: string, options: ResizeOptions): string {
|
||||||
const n = options.n ?? 1
|
const n = options.n ?? 1
|
||||||
if (!src || src === '') {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
return `https://images.weserv.nl/?url=${src}&w=${options.width}&h=${options.height}&n=${n}`
|
return `https://images.weserv.nl/?url=${src}&w=${options.width}&h=${options.height}&n=${n}`
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user