Merged in feat/sw-3191-images (pull request #2670)
feat(images): SW-3191 slightly increase image width to improve quality * feat(images): SW-3191 slightly increase image width to improve quality Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -22,6 +22,10 @@ function imageLoader({ quality, src, width }: ImageLoaderProps) {
|
||||
const isAbsoluteUrl = src.startsWith('https://') || src.startsWith('http://')
|
||||
const hasQS = src.indexOf('?') !== -1
|
||||
|
||||
if (width < 500) {
|
||||
width += 150 // HACK! Slightly increase width for better quality
|
||||
}
|
||||
|
||||
if (isAbsoluteUrl) {
|
||||
return `https://img.scandichotels.com/.netlify/images?url=${src}&w=${width}${quality ? '&q=' + quality : ''}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user