diff options
author | John Zaitseff <[email protected]> | 2019-12-20 01:04:18 +1100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2019-12-19 18:02:11 +0100 |
commit | 158e7ec204e5149d77893d353cac9f55946d3e9a (patch) | |
tree | 24730223af9e728ef2802088ed7fff3a86f4ec7a /resources | |
parent | eef934ae7eabc38eeba386831de6013eec0285f2 (diff) | |
download | hugo-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 'resources')
-rw-r--r-- | resources/images/image.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/resources/images/image.go b/resources/images/image.go index 62e9bb558..a13c1a59e 100644 --- a/resources/images/image.go +++ b/resources/images/image.go @@ -275,7 +275,7 @@ func (f Format) DefaultExtension() string { func (f Format) MediaType() media.Type { switch f { case JPEG: - return media.JPGType + return media.JPEGType case PNG: return media.PNGType case GIF: |