summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-02-05 15:04:07 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-02-05 15:04:07 +0100
commit694c0fd7630ebfb87f1afff712830e96266ed761 (patch)
treef8c6efc4e0e10c2774e340451aa9e50bc6a8b3be /docs
parent15ff0765724c58827be6efa96f06b03b9f1c8cb4 (diff)
docs: Add documentation for smart cropping etc.
Diffstat (limited to 'docs')
-rw-r--r--docs/content/content-management/image-processing/index.md56
-rw-r--r--docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_box.jpg (renamed from docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_box_center.jpg)bin1939 -> 1939 bytes
-rw-r--r--docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_box.jpg (renamed from docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_box_center.jpg)bin5141 -> 5141 bytes
-rw-r--r--docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_box.jpg (renamed from docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_box_center.jpg)bin1295 -> 1295 bytes
-rw-r--r--docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_200x200_fill_q75_box_smart1.jpgbin0 -> 3583 bytes
-rw-r--r--docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_box.jpg (renamed from docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_box_center.jpg)bin1939 -> 1939 bytes
-rw-r--r--docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_box.jpg (renamed from docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_box_center.jpg)bin5141 -> 5141 bytes
-rw-r--r--docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_box.jpg (renamed from docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_box_center.jpg)bin1295 -> 1295 bytes
-rw-r--r--docs/resources/_gen/images/content-management/organization/1-featured-content-bundles_hu3e3ae7839b071119f32acaa20f204198_63640_300x0_resize_box.png (renamed from docs/resources/_gen/images/content-management/organization/1-featured-content-bundles_hu3e3ae7839b071119f32acaa20f204198_63640_300x0_resize_box_center.png)bin21101 -> 21101 bytes
-rw-r--r--docs/resources/_gen/images/news/0.33-relnotes/featured-hugo-33-poster_hu45ce9da1cdea6ca61c5f4f5baccdcad4_70230_480x0_resize_box.png (renamed from docs/resources/_gen/images/news/0.33-relnotes/featured-hugo-33-poster_hu45ce9da1cdea6ca61c5f4f5baccdcad4_70230_480x0_resize_box_center.png)bin66984 -> 66984 bytes
-rw-r--r--docs/resources/_gen/images/news/0.34-relnotes/featured-34-poster_hud8d73dc5df8d5a35383849a78eea35dd_78317_480x0_resize_box.png (renamed from docs/resources/_gen/images/news/0.34-relnotes/0.34-relnotes/featured-34-poster_hud8d73dc5df8d5a35383849a78eea35dd_78317_480x0_resize_box_center.png)bin78872 -> 78872 bytes
-rw-r--r--docs/resources/_gen/images/news/0.35-relnotes/featured-hugo-35-poster_hua42b1310dd72f60a34e02851ebf2f82e_88519_480x0_resize_box.png (renamed from docs/resources/_gen/images/news/0.35-relnotes/featured-hugo-35-poster_hua42b1310dd72f60a34e02851ebf2f82e_88519_480x0_resize_box_center.png)bin90606 -> 90606 bytes
12 files changed, 55 insertions, 1 deletions
diff --git a/docs/content/content-management/image-processing/index.md b/docs/content/content-management/image-processing/index.md
index ba08b1d80..1f84ba04d 100644
--- a/docs/content/content-management/image-processing/index.md
+++ b/docs/content/content-management/image-processing/index.md
@@ -138,4 +138,58 @@ And it is used like this:
{{% note %}}
**Tip:** Note the self-closing shortcode syntax above. The `imgproc` shortcode can be called both with and without **inner content**.
-{{% /note %}} \ No newline at end of file
+{{% /note %}}
+
+## Image Processing Config
+
+You can configure an `imaging` section in `config.toml` with default image processing options:
+
+```toml
+[imaging]
+# Default resample filter used for resizing. Default is Box,
+# a simple and fast averaging filter appropriate for downscaling.
+# See https://github.com/disintegration/imaging
+resampleFilter = "box"
+
+# Defatult JPEG quality setting. Default is 75.
+quality = 75
+
+# Anchor used when cropping pictures.
+# Default is "smart" which does Smart Cropping, using https://github.com/muesli/smartcrop
+# Smart Cropping is content aware and tries to find the best crop for each image.
+# Valid values are Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight
+anchor = "smart"
+
+```
+
+All of the above settings can also be set per image procecssing.
+
+## Smart Cropping of Images
+
+By default, Hugo will use the [Smartcrop](https://github.com/muesli/smartcrop), a library created by [muesli](https://github.com/muesli), when cropping images with `.Fill`. You can set the anchor point manually, but in most cases the smart option will make a good choice. And we will work with the libray author to improve this in the future.
+
+An example using the sunset image from above:
+
+
+{{< imgproc sunset Fill "200x200 smart" />}}
+
+
+## Image Processing Performance Consideration
+
+Processed images are stored below `<project-dir>/resources` (can be set with `resourceDir` config setting). This folder is deliberately placed in the project, as it is recommended to check these into source control as part of the project. These images are not "Hugo fast" to generate, but once generated they can be reused.
+
+If you change your image settings (e.g. size), remove or rename images etc., you will end up with unused images taking up space and cluttering your project.
+
+To clean up, run:
+
+```bash
+hugo --gc
+```
+
+
+{{% note %}}
+**GC** is short for **Garbage Collection**.
+{{% /note %}}
+
+
+
diff --git a/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_box_center.jpg b/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_box.jpg
index 8736f0376..8736f0376 100644
--- a/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_box_center.jpg
+++ b/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_box.jpg
Binary files differ
diff --git a/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_box_center.jpg b/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_box.jpg
index 47d62fce7..47d62fce7 100644
--- a/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_box_center.jpg
+++ b/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_box.jpg
Binary files differ
diff --git a/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_box_center.jpg b/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_box.jpg
index b8ad2659f..b8ad2659f 100644
--- a/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_box_center.jpg
+++ b/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_box.jpg
Binary files differ
diff --git a/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_200x200_fill_q75_box_smart1.jpg b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_200x200_fill_q75_box_smart1.jpg
new file mode 100644
index 000000000..1ef91ac52
--- /dev/null
+++ b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_200x200_fill_q75_box_smart1.jpg
Binary files differ
diff --git a/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_box_center.jpg b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_box.jpg
index 8736f0376..8736f0376 100644
--- a/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_box_center.jpg
+++ b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_box.jpg
Binary files differ
diff --git a/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_box_center.jpg b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_box.jpg
index 47d62fce7..47d62fce7 100644
--- a/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_box_center.jpg
+++ b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_box.jpg
Binary files differ
diff --git a/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_box_center.jpg b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_box.jpg
index b8ad2659f..b8ad2659f 100644
--- a/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_box_center.jpg
+++ b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_box.jpg
Binary files differ
diff --git a/docs/resources/_gen/images/content-management/organization/1-featured-content-bundles_hu3e3ae7839b071119f32acaa20f204198_63640_300x0_resize_box_center.png b/docs/resources/_gen/images/content-management/organization/1-featured-content-bundles_hu3e3ae7839b071119f32acaa20f204198_63640_300x0_resize_box.png
index 7d29ca620..7d29ca620 100644
--- a/docs/resources/_gen/images/content-management/organization/1-featured-content-bundles_hu3e3ae7839b071119f32acaa20f204198_63640_300x0_resize_box_center.png
+++ b/docs/resources/_gen/images/content-management/organization/1-featured-content-bundles_hu3e3ae7839b071119f32acaa20f204198_63640_300x0_resize_box.png
Binary files differ
diff --git a/docs/resources/_gen/images/news/0.33-relnotes/featured-hugo-33-poster_hu45ce9da1cdea6ca61c5f4f5baccdcad4_70230_480x0_resize_box_center.png b/docs/resources/_gen/images/news/0.33-relnotes/featured-hugo-33-poster_hu45ce9da1cdea6ca61c5f4f5baccdcad4_70230_480x0_resize_box.png
index b0e1fe05b..b0e1fe05b 100644
--- a/docs/resources/_gen/images/news/0.33-relnotes/featured-hugo-33-poster_hu45ce9da1cdea6ca61c5f4f5baccdcad4_70230_480x0_resize_box_center.png
+++ b/docs/resources/_gen/images/news/0.33-relnotes/featured-hugo-33-poster_hu45ce9da1cdea6ca61c5f4f5baccdcad4_70230_480x0_resize_box.png
Binary files differ
diff --git a/docs/resources/_gen/images/news/0.34-relnotes/0.34-relnotes/featured-34-poster_hud8d73dc5df8d5a35383849a78eea35dd_78317_480x0_resize_box_center.png b/docs/resources/_gen/images/news/0.34-relnotes/featured-34-poster_hud8d73dc5df8d5a35383849a78eea35dd_78317_480x0_resize_box.png
index 961fead6e..961fead6e 100644
--- a/docs/resources/_gen/images/news/0.34-relnotes/0.34-relnotes/featured-34-poster_hud8d73dc5df8d5a35383849a78eea35dd_78317_480x0_resize_box_center.png
+++ b/docs/resources/_gen/images/news/0.34-relnotes/featured-34-poster_hud8d73dc5df8d5a35383849a78eea35dd_78317_480x0_resize_box.png
Binary files differ
diff --git a/docs/resources/_gen/images/news/0.35-relnotes/featured-hugo-35-poster_hua42b1310dd72f60a34e02851ebf2f82e_88519_480x0_resize_box_center.png b/docs/resources/_gen/images/news/0.35-relnotes/featured-hugo-35-poster_hua42b1310dd72f60a34e02851ebf2f82e_88519_480x0_resize_box.png
index d13befecf..d13befecf 100644
--- a/docs/resources/_gen/images/news/0.35-relnotes/featured-hugo-35-poster_hua42b1310dd72f60a34e02851ebf2f82e_88519_480x0_resize_box_center.png
+++ b/docs/resources/_gen/images/news/0.35-relnotes/featured-hugo-35-poster_hua42b1310dd72f60a34e02851ebf2f82e_88519_480x0_resize_box.png
Binary files differ