hugo

Fork of github.com/gohugoio/hugo with reverse pagination support

git clone git://git.shimmy1996.com/hugo.git

index.md (1856B)

    1 
    2 ---
    3 date: 2018-02-15
    4 title: "Hugo 0.36.1: One Bugfix"
    5 description: "Fixes a multi-thread image processing issue."
    6 categories: ["Releases"]
    7 images:
    8 - images/blog/hugo-bug-poster.png
    9 
   10 ---
   11 	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:
   12 
   13 ```bash
   14 {{ with $img }}
   15 {{ $big := .Fill "1024x512 top" }}
   16 {{ $small := $big.Resize "512x" }}
   17 {{ end }}
   18 ```
   19 
   20 There would be timing issues making Hugo in some cases trying to process the same image twice at the same time.
   21 
   22 You would experience errors of type:
   23 
   24 ```bash
   25 png: invalid format: not enough pixel data
   26 ```
   27 
   28 This commit fixes that by adding a mutex per image. This should also improve the performance, slightly, as it avoids duplicate work.
   29 
   30 The current workaround before this fix is to always operate on the original:
   31 
   32 ```bash
   33 {{ with $img }}
   34 {{ $big := .Fill "1024x512 top" }}
   35 {{ $small := .Fill "512x256 top" }}
   36 {{ end }}
   37 ```
   38 This error was rare (no reports on GitHub or the discussion forum), but very hard to debug for the end user.
   39 
   40 * Fix multi-threaded image processing issue [d8fdffb5](https://github.com/gohugoio/hugo/commit/d8fdffb55268464d54558d6f9cd3874b612dc7c7) [@bep](https://github.com/bep) [#4404](https://github.com/gohugoio/hugo/issues/4404)
   41 * Improve error message in .Render [08521dac](https://github.com/gohugoio/hugo/commit/08521dac8323403933a8fd11acfd16930af5f17d) [@bep](https://github.com/bep) 
   42 * Bump Travis/Snapcraft to Go 1.9.4 [fc23a80f](https://github.com/gohugoio/hugo/commit/fc23a80ffd3878b9ba9a160ce37e0e1d8703faf3) [@bep](https://github.com/bep) 
   43 * Improve error processing error message [2851af02](https://github.com/gohugoio/hugo/commit/2851af0225cdf6c4e47058979cd22949ed6d1fc0) [@bep](https://github.com/bep)