Skip to content

Commit

Permalink
use getImageSize() helper
Browse files Browse the repository at this point in the history
  • Loading branch information
styfle committed Feb 6, 2024
1 parent 57d9af2 commit 94c132d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/src/server/image-optimizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ export async function imageOptimizer(
// During `next dev`, we don't want to generate blur placeholders with webpack
// because it can delay starting the dev server. Instead, `next-image-loader.js`
// will inline a special url to lazily generate the blur placeholder at request time.
const meta = await sharp(optimizedBuffer).metadata()
const meta = await getImageSize(optimizedBuffer)
const opts = {
blurWidth: meta.width,
blurHeight: meta.height,
Expand Down

0 comments on commit 94c132d

Please sign in to comment.