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
This commit is contained in:
John Zaitseff 2019-12-20 01:04:18 +11:00 committed by Bjørn Erik Pedersen
parent 1a6089cfea
commit a7bfdeb24c
3 changed files with 6 additions and 6 deletions

View File

@ -88,7 +88,7 @@ Sometimes it can be useful to create the filter chain once and then reuse it:
Provides an [Exif](https://en.wikipedia.org/wiki/Exif) object with metadata about the image. Provides an [Exif](https://en.wikipedia.org/wiki/Exif) object with metadata about the image.
Note that this is only suported for JPG and TIFF images, so it's recommended to wrap the access with a `with`, e.g.: Note that this is only suported for JPEG and TIFF images, so it's recommended to wrap the access with a `with`, e.g.:
```go-html-template ```go-html-template
{{ with $img.Exif }} {{ with $img.Exif }}

View File

@ -17,7 +17,7 @@ menu:
## Properties ## Properties
ResourceType ResourceType
: The main type of the resource. For example, a file of MIME type `image/jpg` has the ResourceType `image`. : The main type of the resource. For example, a file of MIME type `image/jpeg` has the ResourceType `image`.
Name Name
: Default value is the filename (relative to the owning page). Can be set in front matter. : Default value is the filename (relative to the owning page). Can be set in front matter.
@ -35,7 +35,7 @@ Content
: The content of the resource itself. For most resources, this returns a string with the contents of the file. This can be used to inline some resources, such as `<script>{{ (.Resources.GetMatch "myscript.js").Content | safeJS }}</script>` or `<img src="{{ (.Resources.GetMatch "mylogo.png").Content | base64Encode }}">`. : The content of the resource itself. For most resources, this returns a string with the contents of the file. This can be used to inline some resources, such as `<script>{{ (.Resources.GetMatch "myscript.js").Content | safeJS }}</script>` or `<img src="{{ (.Resources.GetMatch "mylogo.png").Content | base64Encode }}">`.
MediaType MediaType
: The MIME type of the resource, such as `image/jpg`. : The MIME type of the resource, such as `image/jpeg`.
MediaType.MainType MediaType.MainType
: The main type of the resource's MIME type. For example, a file of MIME type `application/pdf` has for MainType `application`. : The main type of the resource's MIME type. For example, a file of MIME type `application/pdf` has for MainType `application`.

View File

@ -1501,10 +1501,10 @@
] ]
}, },
{ {
"type": "image/jpg", "type": "image/jpeg",
"string": "image/jpg", "string": "image/jpeg",
"mainType": "image", "mainType": "image",
"subType": "jpg", "subType": "jpeg",
"delimiter": ".", "delimiter": ".",
"suffixes": [ "suffixes": [
"jpg", "jpg",