Since 0.155.0: (.Colors) site not building unless I always empty resources and public

Strange behaviour since last upgrade from 0.154.5:

ERROR error building site: 
...
...at <$featuredmini.Colors> error calling Colors: image: unknown format

I have to delete the /resources and /public folders and the next time it succeeds, although very slow because there are many images to process.

Not really sure if it’s .Colors or if this is a “false positive” error because the error does not tell which (image-)file hugo tries to process, maybe just a hidden* mac-file and not an image?
My project files have not changed - only the hugo upgrade.

*Working on macOS, in the past I had resources problems caused by hidden .DS_Store files which I solved at the time by excluding them in the config ignoreFiles = ['\.DS_Store$'] and module.mounts.

Further details what I’m doing: I’m building a srcset with different imagesizes from a slice of images

  {{- $featuredfull := $cover | default ((.Resources.ByType "image").GetMatch (.Params.featured_image | default "*feature*")) | default (index $gallery.images 0) }}
  {{- $featuredmini := $featuredfull.Filter (slice images.AutoOrient (images.Process "fit 1300x1000 webp")) -}}
  {{- $color := index $featuredmini.Colors 0 | default "transparent" }}

Although my template-code is messy I don’t want to invest too much refactoring because this has worked before, so maybe it’s not me?
Anybody else with such problems?

1 Like

No, this smells like a bug that was introduced with the reworking of exif/meta in the image processing.

I will fix it before weekend: Regression with .Colors reported on discourse · Issue #14453 · gohugoio/hugo · GitHub

2 Likes

oh thank god Thank You for looking into this!
I won’t have to touch this part in this template… :laughing:

Yes (also on macOS); had to revert to 0.154.5 for now pending @bep’s fix. Thanks in advance for that, BTW.

1 Like