Skip to content

Commit

Permalink
next/image imgix loader can use multiple auto params (#34808)
Browse files Browse the repository at this point in the history
fix: imgixLoader can use multiple auto params
  • Loading branch information
FourwingsY committed Aug 8, 2022
1 parent 4264408 commit 160da6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/next/client/image.tsx
Expand Up @@ -974,7 +974,8 @@ function imgixLoader({
const url = new URL(`${config.path}${normalizeSrc(src)}`)
const params = url.searchParams

params.set('auto', params.get('auto') || 'format')
// auto params can be combined with comma separation, or reiteration
params.set('auto', params.getAll('auto').join(',') || 'format')
params.set('fit', params.get('fit') || 'max')
params.set('w', params.get('w') || width.toString())

Expand Down

0 comments on commit 160da6b

Please sign in to comment.