feat: improve handling of stays
This commit is contained in:
committed by
Michael Zetterberg
parent
e733ce283a
commit
f46207a308
@@ -5,7 +5,8 @@ import NextImage from "next/image"
|
||||
import type { ImageLoaderProps, ImageProps } from "next/image"
|
||||
|
||||
function imageLoader({ quality, src, width }: ImageLoaderProps) {
|
||||
return `${src}?w=${width}${quality ? "&q=" + quality : ""}`
|
||||
const hasQS = src.indexOf("?") !== -1
|
||||
return `${src}${hasQS ? "&" : "?"}w=${width}${quality ? "&q=" + quality : ""}`
|
||||
}
|
||||
|
||||
// Next/Image adds & instead of ? before the params
|
||||
|
||||
Reference in New Issue
Block a user