mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
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:
committed by
Bjørn Erik Pedersen
parent
eef934ae7e
commit
158e7ec204
@@ -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.
|
||||
|
||||
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
|
||||
{{ with $img.Exif }}
|
||||
|
@@ -17,7 +17,7 @@ menu:
|
||||
## Properties
|
||||
|
||||
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
|
||||
: 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 }}">`.
|
||||
|
||||
MediaType
|
||||
: The MIME type of the resource, such as `image/jpg`.
|
||||
: The MIME type of the resource, such as `image/jpeg`.
|
||||
|
||||
MediaType.MainType
|
||||
: The main type of the resource's MIME type. For example, a file of MIME type `application/pdf` has for MainType `application`.
|
||||
|
@@ -1501,10 +1501,10 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "image/jpg",
|
||||
"string": "image/jpg",
|
||||
"type": "image/jpeg",
|
||||
"string": "image/jpeg",
|
||||
"mainType": "image",
|
||||
"subType": "jpg",
|
||||
"subType": "jpeg",
|
||||
"delimiter": ".",
|
||||
"suffixes": [
|
||||
"jpg",
|
||||
|
Reference in New Issue
Block a user