v0.36.1
This release fixes a multi-thread issue when reprocessing and reusing images across pages. When doing something like this with the same image from a partial used in, say, both the home page and the single page:
{{ with $img }}
{{ $big := .Fill "1024x512 top" }}
{{ $small := $big.Resize "512x" }}
{{ end }}
There would be timing issues making Hugo in some cases trying to process the same image twice at the same time.
You would experience errors of type:
png: invalid format: not enough pixel data
This commit fixes that by adding a mutex per image. This should also improve the performance, sligthly, as it avoids duplicate work.
The current workaround before this fix is to always operate on the original:
{{ with $img }}
{{ $big := .Fill "1024x512 top" }}
{{ $small := .Fill "512x256 top" }}
{{ end }}
This error was rare (no reports on GitHub or the discussion forum), but very hard to debug for the end user.
- Fix multi-threaded image processing issue d8fdffb5 @bep #4404
- Improve error message in .Render 08521dac @bep
- Bump Travis/Snapcraft to Go 1.9.4 fc23a80f @bep
- Improve error processing error message 2851af02 @bep
Automated with GoReleaser
Built with go version go1.9.4 linux/amd64