diff --git a/mime-parse/src/constants.rs b/mime-parse/src/constants.rs index 634c2bf3..6fe73857 100644 --- a/mime-parse/src/constants.rs +++ b/mime-parse/src/constants.rs @@ -269,6 +269,9 @@ impl Atoms { if sub == JPEG { return Atoms::IMAGE_JPEG; } + if sub == WEBP { + return Atoms::IMAGE_WEBP; + } }, 7 => { if sub == SVG { @@ -418,6 +421,7 @@ names! { BMP, "bmp"; GIF, "gif"; JPEG, "jpeg"; + WEBP, "webp"; PNG, "png"; SVG, "svg+xml"; @@ -453,6 +457,7 @@ mimes! { IMAGE_GIF, "image/gif", 5; IMAGE_PNG, "image/png", 5; IMAGE_BMP, "image/bmp", 5; + IMAGE_WEBP, "image/webp", 5; IMAGE_SVG, "image/svg+xml", 5, Some(9); FONT_WOFF, "font/woff", 4; diff --git a/src/constants.rs b/src/constants.rs index af4376ec..57db0d3e 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -96,6 +96,7 @@ mimes! { IMAGE_GIF, "image/gif"; IMAGE_PNG, "image/png"; IMAGE_BMP, "image/bmp"; + IMAGE_WEBP, "image/webp"; IMAGE_SVG, "image/svg+xml"; FONT_WOFF, "font/woff";