-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
Fallback to an automatically-generated blurry placeholder #24875
Comments
Please verify that your issue can be recreated with Why was this issue marked with the
|
This was implemented in Next.js 11 |
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. |
In PR #24153 @Joonpark13 added a feature to allow the image component to display a blurry placeholder that's passed to it in the form of a URL (inline dataURL or actual URL). Methods for automatically supplying this URL to the image component are currently in development, but I think it would also be a good idea to add a fallback behavior to the component where the specified loader is used to generate a very small (10 px wide or less) image to be used as the blurry placeholder.
The reason this is the fallback behavior rather than the intended general use case is that performance will be better if the placeholder can be rendered (as a dataURL) at serve- or build-time. Having a remote URL for the placeholder introduces an extra network round trip before the placeholder can be displayed.
Having this functionality available as a fallback will allow for wider beta testing of the blurry placeholder feature, and will help cover corner cases where we may not be able to server-side render the placeholder.
The text was updated successfully, but these errors were encountered: