Inconsistent ERROR on macOS: *resources.genericResource is not an image

Hugo v.0.55.6 is the last version that this project is generated on macOS
Since v.0.56.0 the ERROR *resources.genericResource is not an image is encountered.

(I will file a bug report on GitHub later tonight -I am busy at the moment-).

Recently -while away- I cloned a project on a MacBook Pro with the latest macOS Mojave.

The project in question ran smoothly on a Xubuntu 18.04.3 and deployed on Netlify with all thumbnails generated with the latest Hugo version.

The code in question is located in a couple of partials i.e. hero.html and img.html.

<--- $name is declared above --->
{{- with .Page.Resources.Match $name -}}
{{- range . -}}
{{ $original := . }}
{{- $resource := . -}}
{{- $thumb := $resource.Resize "x1024" -}}
<-- HTML template -->
{{- end -}}
{{- end -}}

Then these partials are called via a couple of inline shortcodes like so:

{{< hero.inline >}}
{{ partial "hero.html" . }}
{{</ hero.inline >}}

The folder structure is a typical Page bundle and said images are located in a /img/ and /hero/ subdirectory of said page bundle.

Images have a .jpg lowercase extension. I have tried renaming them, re-typing the extension, ran hugo --gc, cloning the repo with committed resources that were generated in Xubuntu but no dice.

This particular project simply refuses to generate on macOS.

And I just cannot figure out why.

The project in question is large and private but if needed I can give access and detailed instructions.
I can create a stripped down private repo later today.

This is one of the weirdest issues that I have ever encountered while working with Hugo.

I made a simplified repo while preparing to file a bug report on GitHub.
But then the simplified repo built fine on macOS.

  • So I deleted the Page Bundle in the original project that contained the unrecognizable images.

  • Then I copied the Page Bundle from the simplified repo to the original project.

  • The site generated.

  • Then I deleted the copied Page Bundle and performed a hard reset to the remote repo.

Apparently now the project generates (as it should have from the beginning) and I really cannot figure out why…

Not sure if could be related but I had some trouble with Git, Hugo, and renaming by only changing min<=>MAJ in name files.

Had to change it with a “Real” name change to fix it