forked from google/eleventy-high-performance-blog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid issues with blurred images and transparency. Correctly handle P…
…NG source images (google#121) - Removes the race condition where memory cached images may keep their blurred images in the background which shine through with transparent foreground images. - Fallback to PNG instead of JPEG if the input image is a PNG. Keeps AVIF and WEBP lossy compression as they do support transparency. Fixes google#120
- Loading branch information
Showing
4 changed files
with
38 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ const extension = { | |
jpeg: "jpg", | ||
webp: "webp", | ||
avif: "avif", | ||
png: "png", | ||
}; | ||
|
||
const quality = { | ||
|
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