Mention WebP under 'Target Format' (#1431)

Plus use [official spelling](https://en.wikipedia.org/wiki/WebP) of `WebP`.
This commit is contained in:
Salim B 2021-05-03 03:47:53 +00:00 committed by GitHub
parent 9467845085
commit 04d30677dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -167,21 +167,21 @@ For color codes, see https://www.google.com/search?q=color+picker
**Note** that you also set a default background color to use, see [Image Processing Config](#image-processing-config). **Note** that you also set a default background color to use, see [Image Processing Config](#image-processing-config).
### JPEG and Webp Quality ### JPEG and WebP Quality
Only relevant for JPEG and Webp images, values 1 to 100 inclusive, higher is better. Default is 75. Only relevant for JPEG and WebP images, values 1 to 100 inclusive, higher is better. Default is 75.
```go ```go
{{ $image.Resize "600x q50" }} {{ $image.Resize "600x q50" }}
``` ```
{{< new-in "0.83.0" >}} Webp support was added in Hugo 0.83.0. {{< new-in "0.83.0" >}} WebP support was added in Hugo 0.83.0.
### Hint ### Hint
{{< new-in "0.83.0" >}} {{< new-in "0.83.0" >}}
Hint about what type of image this is. Currently only used when encoding to Webp. Hint about what type of image this is. Currently only used when encoding to WebP.
Default value is `photo`. Default value is `photo`.
@ -227,12 +227,14 @@ See https://github.com/disintegration/imaging for more. If you want to trade qua
By default the images is encoded in the source format, but you can set the target format as an option. By default the images is encoded in the source format, but you can set the target format as an option.
Valid values are `jpg`, `png`, `tif`, `bmp`, and `gif`. Valid values are `jpg`, `png`, `tif`, `bmp`, `gif` and `webp`.
```go ```go
{{ $image.Resize "600x jpg" }} {{ $image.Resize "600x jpg" }}
``` ```
{{< new-in "0.83.0" >}} WebP support was added in Hugo 0.83.0.
## Image Processing Examples ## Image Processing Examples
_The photo of the sunset used in the examples below is Copyright [Bjørn Erik Pedersen](https://commons.wikimedia.org/wiki/User:Bep) (Creative Commons Attribution-Share Alike 4.0 International license)_ _The photo of the sunset used in the examples below is Copyright [Bjørn Erik Pedersen](https://commons.wikimedia.org/wiki/User:Bep) (Creative Commons Attribution-Share Alike 4.0 International license)_
@ -274,10 +276,10 @@ You can configure an `imaging` section in `config.toml` with default image proce
# See https://github.com/disintegration/imaging # See https://github.com/disintegration/imaging
resampleFilter = "box" resampleFilter = "box"
# Default JPEG or WEBP quality setting. Default is 75. # Default JPEG or WebP quality setting. Default is 75.
quality = 75 quality = 75
# Default hint about what type of image. Currently only used for Webp encoding. # Default hint about what type of image. Currently only used for WebP encoding.
# Default is "photo". # Default is "photo".
# Valid values are "picture", "photo", "drawing", "icon", or "text". # Valid values are "picture", "photo", "drawing", "icon", or "text".
hint = "photo" hint = "photo"