New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next/future/image blur placeholder have undefined to view box SVG width & height #41393
Closed
1 task done
Labels
Image (next/image)
Related to Next.js Image Optimization.
Comments
balazsorban44
added
the
Image (next/image)
Related to Next.js Image Optimization.
label
Oct 13, 2022
Looks like a duplicate of #40419 |
@balazsorban44 maybe, not sure... but probably related 😉
|
styfle
added
kind: bug
and removed
bug
Issue was opened via the bug report template.
labels
Oct 19, 2022
Thanks for reporting! We'll get this fixed in #41573 |
ijjk
pushed a commit
that referenced
this issue
Oct 19, 2022
This PR fixes two bugs: - Fixes #40419 - Fixes #41393 The first is when the aspect ratio of the `width` and `height` does not match the aspect ratio of the `blurDataURL` provided. This can result in artifacts around the edges. The solution is to add `preserveAspectRatio="none"`. The second is when there is no `width` or `height` provided (which is normal when using `fill`) so the viewBox was undefined. This can also cause artifacts around the edges. The solution is to change the blur technique from gaussian to css filter, similar to `next/legacy/image`. Note: css blur might be [slower in firefox](https://bugzilla.mozilla.org/show_bug.cgi?id=925025) which is why we'll only use it for this corner case.
Kikobeats
pushed a commit
to Kikobeats/next.js
that referenced
this issue
Oct 24, 2022
This PR fixes two bugs: - Fixes vercel#40419 - Fixes vercel#41393 The first is when the aspect ratio of the `width` and `height` does not match the aspect ratio of the `blurDataURL` provided. This can result in artifacts around the edges. The solution is to add `preserveAspectRatio="none"`. The second is when there is no `width` or `height` provided (which is normal when using `fill`) so the viewBox was undefined. This can also cause artifacts around the edges. The solution is to change the blur technique from gaussian to css filter, similar to `next/legacy/image`. Note: css blur might be [slower in firefox](https://bugzilla.mozilla.org/show_bug.cgi?id=925025) which is why we'll only use it for this corner case.
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Verify canary release
Provide environment information
What browser are you using? (if relevant)
Brave Version 1.44.108 Chromium: 106.0.5249.103
How are you deploying your application? (if relevant)
Vercel
Describe the Bug
Wrong SVG viewBox generated when using placeHolder='blur' with image filling his parent
The blur base64
The SVG using the blur base64
As we can see in the
src/blur.svg
the viewBox have weird valuesSo the svg have this weird artifacts and the black borders
Expected Behavior
I expected the placeHolder to be rendered without artefacts and with a corect viewBox for the SVG not undefined in width & height
Link to reproduction
https://next-future-image-issue-sigma.vercel.app/
To Reproduce
A repo with all the need to reproduce
https://github.com/Balkeo/next-future-image-issue
The text was updated successfully, but these errors were encountered: