mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-11 05:54:58 +00:00
Merge commit 'eb738cd35cca1ffc68c5ed688dbe2a19108e8761'
This commit is contained in:
@@ -12,6 +12,8 @@ sections_weight: 10
|
||||
draft: false
|
||||
aliases: []
|
||||
toc: true
|
||||
images:
|
||||
- images/blog/sunset.jpg
|
||||
---
|
||||
|
||||
|
||||
@@ -119,6 +121,35 @@ Image operations in Hugo currently **do not preserve EXIF data** as this is not
|
||||
{{% /note %}}
|
||||
|
||||
|
||||
### 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)_
|
||||
|
||||
|
||||
{{< imgproc sunset Resize "300x" >}}
|
||||
|
||||
{{< imgproc sunset Fill "90x120 left" >}}
|
||||
|
||||
{{< imgproc sunset Fill "90x120 right" >}}
|
||||
|
||||
{{< imgproc sunset Fit "90x90" >}}
|
||||
|
||||
{{< imgproc sunset Resize "300x q10" >}}
|
||||
|
||||
|
||||
This is the shortcode used in the examples above:
|
||||
|
||||
|
||||
{{< code file="layouts/shortcodes/imgproc.html" >}}
|
||||
{{< readfile file="layouts/shortcodes/imgproc.html" >}}
|
||||
{{< /code >}}
|
||||
|
||||
And it is used like this:
|
||||
|
||||
```html
|
||||
{{</* imgproc sunset Resize "300x" */>}}
|
||||
```
|
||||
|
||||
### Image Processing Options
|
||||
|
||||
In addition to the dimensions (e.g. `200x100`) where either height or width can be omitted, Hugo supports a set of additional image options:
|
||||
BIN
docs/content/about/new-in-032/sunset.jpg
Normal file
BIN
docs/content/about/new-in-032/sunset.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 88 KiB |
Reference in New Issue
Block a user