Unverified Commit ab7b0f59 authored by Nilesh Suthar's avatar Nilesh Suthar Committed by GitHub

chore: support progressive jpg with sharp (#56617)

### What?
Use Progressive JPG when optimizing images using Sharp with Sqooush we
are already using [progressive
jpg](https://github.com/vercel/next.js/blob/9b2f29ebaf5add67cec0cac7296f9e64567b3fb4/packages/next/src/server/lib/squoosh/codecs.ts#L232)
Co-authored-by: 's avatarSteven <steven@ceriously.com>
parent abe8b1e0
...@@ -450,7 +450,7 @@ export async function optimizeImage({ ...@@ -450,7 +450,7 @@ export async function optimizeImage({
} else if (contentType === PNG) { } else if (contentType === PNG) {
transformer.png({ quality }) transformer.png({ quality })
} else if (contentType === JPEG) { } else if (contentType === JPEG) {
transformer.jpeg({ quality }) transformer.jpeg({ quality, progressive: true })
} }
optimizedBuffer = await transformer.toBuffer() optimizedBuffer = await transformer.toBuffer()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment