Skip to content

Commit

Permalink
Add webp Mime type
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 committed Oct 15, 2020
1 parent 938484d commit 8c949c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mime-parse/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ impl Atoms {
if sub == JPEG {
return Atoms::IMAGE_JPEG;
}
if sub == WEBP {
return Atoms::IMAGE_WEBP;
}
},
7 => {
if sub == SVG {
Expand Down Expand Up @@ -418,6 +421,7 @@ names! {
BMP, "bmp";
GIF, "gif";
JPEG, "jpeg";
WEBP, "webp";
PNG, "png";
SVG, "svg+xml";

Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 8c949c9

Please sign in to comment.