Skip to content

Commit

Permalink
Fix width param name for Image Optimizer (#17952)
Browse files Browse the repository at this point in the history
Image Optimizer only accepts the name of the width parameter as a `w`.

ref https://github.com/vercel/next.js/blob/v9.5.6-canary.3/packages/next/next-server/server/image-optimizer.ts#L71
  • Loading branch information
ykzts committed Oct 16, 2020
1 parent 9845824 commit 5f7c6ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/client/image.tsx
Expand Up @@ -180,5 +180,5 @@ function cloudinaryLoader({ root, src, width }: LoaderProps): string {

function defaultLoader({ root, src, width }: LoaderProps): string {
// TODO: change quality parameter to be configurable
return `${root}?url=${encodeURIComponent(src)}&width=${width}&q=100`
return `${root}?url=${encodeURIComponent(src)}&w=${width}&q=100`
}

0 comments on commit 5f7c6ae

Please sign in to comment.