diff options
author | Bjørn Erik Pedersen <[email protected]> | 2021-04-07 16:49:34 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2021-04-15 17:22:55 +0200 |
commit | 33d5f805923eb50dfb309d024f6555c59a339846 (patch) | |
tree | cba8fde34849640bc09bd68d85c5d7a6ba042add /media | |
parent | 509d39fa6ddbba106c127b7923a41b0dcaea9381 (diff) | |
download | hugo-33d5f805923eb50dfb309d024f6555c59a339846.tar.gz hugo-33d5f805923eb50dfb309d024f6555c59a339846.zip |
Add webp image encoding support
Fixes #5924
Diffstat (limited to 'media')
-rw-r--r-- | media/mediaType.go | 2 | ||||
-rw-r--r-- | media/mediaType_test.go | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/media/mediaType.go b/media/mediaType.go index a35d80e3e..164ad5fd2 100644 --- a/media/mediaType.go +++ b/media/mediaType.go @@ -180,6 +180,7 @@ var ( GIFType = newMediaType("image", "gif", []string{"gif"}) TIFFType = newMediaType("image", "tiff", []string{"tif", "tiff"}) BMPType = newMediaType("image", "bmp", []string{"bmp"}) + WEBPType = newMediaType("image", "webp", []string{"webp"}) // Common video types AVIType = newMediaType("video", "x-msvideo", []string{"avi"}) @@ -214,6 +215,7 @@ var DefaultTypes = Types{ TOMLType, PNGType, JPEGType, + WEBPType, AVIType, MPEGType, MP4Type, diff --git a/media/mediaType_test.go b/media/mediaType_test.go index e44ab27ec..6bc42b3d4 100644 --- a/media/mediaType_test.go +++ b/media/mediaType_test.go @@ -55,7 +55,7 @@ func TestDefaultTypes(t *testing.T) { } - c.Assert(len(DefaultTypes), qt.Equals, 26) + c.Assert(len(DefaultTypes), qt.Equals, 27) } func TestGetByType(t *testing.T) { |