12 KiB
date: 2019-09-04 title: "Image Processing Galore!" description: "Hugo 0.58 adds the long sought after Exif method plus many useful image filters. And it's faster ..." categories: ["Releases"]
Hugo 0.58 adds the long sought after Exif (docs) method on image and a bunch of useful image filters (docs), courtesy of @disintegration's great Gift image library.
This means that you now can do variations of this:
{{ $blurryGrayscale := $myimage.Resize "300x200" | images.Filter images.Grayscale (images.GaussianBlur 8) }}
{{ $exif := $myimg.Exif }}
It's worth noting that the issue that enabled/triggered the implementation of the above was the simplifications needed to fix #5903, which makes sure that type information is preserved when processed via Hugo Pipes. E.g. you can now do:
{{ ($myimg | fingerprint ).Width }}
And it works as expected.
This release is also built with the brand new Go 1.13 which means that it's also the fastest Hugo version to date.
This release represents 39 contributions by 5 contributors to the main Hugo code base.@bep leads the Hugo development with a significant amount of contributions, but also a big shoutout to @niklasfasching, @vazrupe, and @jakejarvis for their ongoing contributions.
And a big thanks to @digitalcraftsman and @onedrawingperday for their relentless work on keeping the themes site in pristine condition and to @kaushalmodi for his great work on the documentation site.
Many have also been busy writing and fixing the documentation in hugoDocs, which has received 8 contributions by 8 contributors. A special thanks to @jacebenson, @digitalcraftsman, @jernst, and @rgwood for their work on the documentation site.
Hugo now has:
- 37859+ stars
- 440+ contributors
- 317+ themes
Notes
home.Pages
now behaves like all the other sections, see #6240. If you want to list all the regular pages, use.Site.RegularPages
.- We have added some new image filters to Hugo's image processing. This also means that we have consolidated the resize operations to use the one
gift
library (from the same developer as the one we used before). The operations work as before, but one difference is that we no longer embed color profile information in PNG images, but this should also be a more portable solution. Software that supports color profiles will assume that images without an embedded profile are in the sRGB profile. Software that doesn't support color profiles will use the monitor's profile, which is most likely to be sRGB as well. - We have improved the file cache logic for processed images and only stores them once when the same image is bundled in multiple languages. This means that you may want to run
hugo --gc
to clean your image cache.
Enhancements
Templates
- Migrate last shortcodes (YouTube and Vimeo) to HTTPS embeds 00297085 @jakejarvis
- Use RegularPages for RSS template 88d69936 @bep #6238
- Avoid "home page warning" in RSS template 564cf1bb @bep #6238
Core
- Adjust Go version specific test dc3f3df2 @bep #6304
- Remove the old and slow site benchmarks 28501ceb @bep
- Add a Sass includePaths test 1b5c7e32 @bep #6274
- Change to output non-panic error message if missing shortcode template fd3d90ce @vazrupe #6075
- Don't use the global warning logger ea681603 @bep #6238
- Allow index.md inside bundles 4b4bdcfe @bep #6208
- Add a site benchmark 416493b5 @bep
- Recover and log panics in content init 7f3aab5a @bep #6210
- Add some outputs tests 028b9926 @bep #6210
Other
- Update to Go 1.13 b4313011 @bep #6304
- Cache processed images by their source path 8624b9fe @bep #6269
- Remove test artifact 018494f3 @bep
- Make the "is this a Hugo Module" logic more lenient 43298f02 @bep #6299
- Update to Go 1.11.13 and 1.12.9 05d83b6c @bep #6228
- Make home.Pages work like any other section 4898fb3d @bep #6240
- Add some fingerprint tests 45d7988f @bep #6284#6280
- Cache Exif data to disk ce47c21a @bep #6291
- Remove metaDataFormat setting de9cbf61 @bep
- Make the Exif benchmark filenames distinct 4f501169 @bep
- Add Exif benchmark 3becba7a @bep #6291
- Remove unused map type 20bdc69a @bep
- Add image.Exif 28143397 @bep #4600
- Add a set of image filters 823f53c8 @bep #6255
- Image resource refactor f9978ed1 @bep #5903#6234#6266
- Remove debug check left during development ad1d6d64 @bep #6249
- Adjust the default paginator for sections 18836a71 @bep #6231
- Update to Go 1.11.13 and 1.12.9 f28efd35 @bep #6228
- Disable "auto tidy" for now 321418f2 @bep #6115
- Make sure the hugo field is always initialized before it's used ea9261e8 @vazrupe #6193
Fixes
Core
- Fix draft etc. handling of _index.md pages 6ccf50ea @bep #6222#6210
- Fix taxonomies vs expired 9475f61a @bep #6213