Enable image lens for WebP (#2126)

This commit is contained in:
Kid
2022-02-21 04:04:56 +08:00
committed by GitHub
parent 3cb47d3812
commit 988be55db6

View File

@@ -3,7 +3,7 @@ import { Lens } from "./lenses"
const imageLens: Lens = {
lensName: "response.image",
isSupportedContentType: (contentType) =>
/\bimage\/(?:gif|jpeg|png|bmp|svg\+xml|x-icon|vnd\.microsoft\.icon)\b/i.test(
/\bimage\/(?:gif|jpeg|png|webp|bmp|svg\+xml|x-icon|vnd\.microsoft\.icon)\b/i.test(
contentType
),
renderer: "imageres",