Skip to content

Commit

Permalink
fix: blurred image not positioned correctly when using object-position
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkCode01 committed Jun 18, 2021
1 parent 67f5830 commit b4399dd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
1 change: 1 addition & 0 deletions packages/next/client/image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ export default function Image({
backgroundImage: `url("${blurDataURL}")`,
}
: undefined),
...(objectPosition && { backgroundPosition: objectPosition }),
}
if (
typeof widthInt !== 'undefined' &&
Expand Down
2 changes: 1 addition & 1 deletion test/integration/image-optimizer/next.config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 1 addition & 19 deletions test/integration/prerender/next.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1 @@
module.exports = {
// target
rewrites() {
return [
{
source: '/some-rewrite/:item',
destination: '/blog/post-:item',
},
{
source: '/about',
destination: '/lang/en/about',
},
{
source: '/blocked-create',
destination: '/blocking-fallback/blocked-create',
},
]
},
}
module.exports = { experimental: { cpus: 1 } }

0 comments on commit b4399dd

Please sign in to comment.