aboutsummaryrefslogtreecommitdiffhomepage
path: root/media
diff options
context:
space:
mode:
authorJohn Zaitseff <[email protected]>2019-12-20 01:04:18 +1100
committerBjørn Erik Pedersen <[email protected]>2019-12-19 18:02:11 +0100
commit158e7ec204e5149d77893d353cac9f55946d3e9a (patch)
tree24730223af9e728ef2802088ed7fff3a86f4ec7a /media
parenteef934ae7eabc38eeba386831de6013eec0285f2 (diff)
downloadhugo-158e7ec204e5149d77893d353cac9f55946d3e9a.tar.gz
hugo-158e7ec204e5149d77893d353cac9f55946d3e9a.zip
Fix incorrect MIME type from image/jpg to image/jpeg
According to multiple sources, both official ([IANA] and [RFC2046]) and otherwise (eg, [Mozilla] and [Wikipedia]), the official MIME type for JPEG images is `image/jpeg`, not `image/jpg`. Change Hugo to match. [IANA]: https://www.iana.org/assignments/media-types/media-types.xhtml#image [RFC2046]: https://tools.ietf.org/html/rfc2046 [Mozilla]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types [Wikipedia]: https://en.wikipedia.org/wiki/JPEG
Diffstat (limited to 'media')
-rw-r--r--media/mediaType.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/media/mediaType.go b/media/mediaType.go
index 05a37921d..e33583a0e 100644
--- a/media/mediaType.go
+++ b/media/mediaType.go
@@ -140,7 +140,7 @@ var (
// Common image types
PNGType = Type{MainType: "image", SubType: "png", Suffixes: []string{"png"}, Delimiter: defaultDelimiter}
- JPGType = Type{MainType: "image", SubType: "jpg", Suffixes: []string{"jpg", "jpeg"}, Delimiter: defaultDelimiter}
+ JPEGType = Type{MainType: "image", SubType: "jpeg", Suffixes: []string{"jpg", "jpeg"}, Delimiter: defaultDelimiter}
GIFType = Type{MainType: "image", SubType: "gif", Suffixes: []string{"gif"}, Delimiter: defaultDelimiter}
TIFFType = Type{MainType: "image", SubType: "tiff", Suffixes: []string{"tif", "tiff"}, Delimiter: defaultDelimiter}
BMPType = Type{MainType: "image", SubType: "bmp", Suffixes: []string{"bmp"}, Delimiter: defaultDelimiter}
@@ -174,7 +174,7 @@ var DefaultTypes = Types{
YAMLType,
TOMLType,
PNGType,
- JPGType,
+ JPEGType,
AVIType,
MPEGType,
MP4Type,