gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
74.88k stars 7.47k forks source link

gallery shortcode error #11484

Closed robpetrosino closed 1 year ago

robpetrosino commented 1 year ago

What version of Hugo are you using (hugo version)?

v0.118.2

Does this issue reproduce with the latest release?`

I am building my website with Hugo/wowchemy. In particular, I am trying to add an album to one of my pages. I followed the instructions here 3. However, I am getting the following message:

Error: error building site: "/Users/rp3650/Desktop/starter-hugo-academic-main/content/panini/index.md:20:1": failed to render shortcode "gallery": failed to process shortcode: "/Users/rp3650/Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.8.1-0.20230812165002-59b648791d3f/layouts/shortcodes/gallery.html:34:17": execute of template failed: template: shortcodes/gallery.html:34:17: executing "shortcodes/gallery.html" at <.Fit>: error calling Fit: this method is only available for image resources

I tried to use the demo album of the template I cloned, and it works, so it’s a problem related to my images, rather than the actual. I have tried to change the format (jpeg to jpg/png) and reduce the size (< 200 KB), but I still get the same error. I have tried to ask for help in the Hugo Discourse forum and the Wowchemy Discord channel, but no one was able to help.

I tried to do test each of the picture I wanted to add to the gallery, but it looks like any picture would generate the error. When I tried to put some of my pics in the built-in demo folder, the same error popped up. Now even after removing my pictures and having the default folder contain the default pictures only, I get the same error. Even removing all pictures from the linked folder, it would generate the same error.

So it looks like the error is generated by some non-image hidden file(s) in the folder such as OS generated thumbnail files. But I couldn’t find anything like that in the folders, even after making hidden files visible.

bep commented 1 year ago

Please use https://discourse.gohugo.io/ for questions/troubleshooting. Also see Hugo Documentation.

robpetrosino commented 1 year ago

@bep I have indeed posted this in the forum, without getting any reply. Should I just abandon the issue?

github-actions[bot] commented 11 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.