-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(image): warn when animated image is missing
unoptimized
prop (#…
…61045) This PR adds a warning when attempting to optimize an animated image. ```jsx <Image src="/image.gif" /> ``` The warning looks like the following: ``` The requested resource "/image.gif" is an animated image so it will not be optimized. Consider adding the "unoptimized" property to the <Image>. ``` To remove the warning, add the `unoptimized` prop. ```jsx <Image src="/image.gif" unoptimized /> ``` We don't attempt to optimized animated images because it can be very slow (30+ seconds) and sometimes deoptimizeds (the output is larger than the input) so its best to serve the animated image as-is. Closes NEXT-2199
- Loading branch information
Showing
2 changed files
with
17 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters