Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Zaitseff <J.Zaitseff@zap.org.au>2019-12-19 17:04:18 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-12-19 20:02:11 +0300
commit158e7ec204e5149d77893d353cac9f55946d3e9a (patch)
tree24730223af9e728ef2802088ed7fff3a86f4ec7a /resources
parenteef934ae7eabc38eeba386831de6013eec0285f2 (diff)
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.go2
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: