# Gallery module error message

**URL:** <https://discourse.gohugo.io/t/gallery-module-error-message/46307>\
**Category:** support\
**Tags:** modules, images\
**Created:** [September 20, 2023, 4:21am UTC](https://discourse.gohugo.io/t/gallery-module-error-message/46307 "2023-09-20T04:21:16Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobparsley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bobparsley/32/20372_2.png) [@bobparsley](https://discourse.gohugo.io/u/bobparsley)\
**Post date:** [September 20, 2023, 4:21am UTC](https://discourse.gohugo.io/t/gallery-module-error-message/46307/1 "2023-09-20T04:21:16Z")

</div>

Hi all, 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](https://wowchemy.com/docs/content/writing-markdown-latex/#image-gallery) and that’s what my page says:

```auto
---
title: Photo album
summary: '' 
date: ''

reading_time: false # Show estimated reading time?
share: false # Show social sharing links?
profile: false # Show author profile?
comments: false # Show comments?

# Optional header image (relative to `assets/media/` folder).
header:
  caption: ""
  image: ""
---

{{< gallery album="<ALBUM-FOLDER>" >}}

```

However, I am getting the following message:

```auto
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. Does anyone know what could be the source of the error?

Thanks!

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [September 20, 2023, 4:51am UTC](https://discourse.gohugo.io/t/gallery-module-error-message/46307/2 "2023-09-20T04:51:35Z")

</div>

You are more likely to receive an accurate and timely response from the Wowchemy team:  
[https://github.com/wowchemy/wowchemy-hugo-themes/discussions](https://github.com/wowchemy/wowchemy-hugo-themes/discussions)

They also have an active Discord channel:  
[https://discord.com/invite/z8wNYzb](https://discord.com/invite/z8wNYzb)

cc: @alcarazr

---

<div class="post-metadata">

**Author:** ![bobparsley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bobparsley/32/20372_2.png) [@bobparsley](https://discourse.gohugo.io/u/bobparsley)\
**Post date:** [September 20, 2023, 5:01am UTC](https://discourse.gohugo.io/t/gallery-module-error-message/46307/3 "2023-09-20T05:01:34Z")

</div>

Hi,

Thank you for replying. I had already posted a question both in the GitHub discussion page and the discord channel. No reply at the moment, apart from someone actually suggesting to post on this forum.

---

<div class="post-metadata">

**Author:** ![alcarazr](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/alcarazr/32/11576_2.png) [@alcarazr](https://discourse.gohugo.io/u/alcarazr)\
**Post date:** [September 20, 2023, 5:35am UTC](https://discourse.gohugo.io/t/gallery-module-error-message/46307/4 "2023-09-20T05:35:26Z")

</div>

Copied from Discord:

Try adding the images one by one until you find the _offending_ one

---

<div class="post-metadata">

**Author:** ![bobparsley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bobparsley/32/20372_2.png) [@bobparsley](https://discourse.gohugo.io/u/bobparsley)\
**Post date:** [September 20, 2023, 6:26am UTC](https://discourse.gohugo.io/t/gallery-module-error-message/46307/5 "2023-09-20T06:26:40Z")

</div>

Hi @alcarazr,

Thanks for the message here too! I just replied to you on Discord!

---

<div class="post-metadata">

**Author:** ![bobparsley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bobparsley/32/20372_2.png) [@bobparsley](https://discourse.gohugo.io/u/bobparsley)\
**Post date:** [September 20, 2023, 11:00am UTC](https://discourse.gohugo.io/t/gallery-module-error-message/46307/6 "2023-09-20T11:00:12Z")

</div>

Ok, so people from Wowchemy Discord are suggesting to seek help here.

> Try adding the images one by one until you find the _offending_ one

I tried to do what @alcarazr was suggesting, but it looks like any picture would generate the error. Even more weirdly, I tried to put some of my pics in the built-in `demo` folder, and the same error popped up even when changing the folder. 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.

Someone else from the Discord channel suggested that there are 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.

Can anyone help?

---

<div class="post-metadata">

**Author:** ![bobparsley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bobparsley/32/20372_2.png) [@bobparsley](https://discourse.gohugo.io/u/bobparsley)\
**Post date:** [September 21, 2023, 8:36am UTC](https://discourse.gohugo.io/t/gallery-module-error-message/46307/7 "2023-09-21T08:36:52Z")

</div>

I am adding this message here just to ask for help on this.

Thanks!

---

<div class="post-metadata">

**Author:** ![bobparsley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bobparsley/32/20372_2.png) [@bobparsley](https://discourse.gohugo.io/u/bobparsley)\
**Post date:** [September 26, 2023, 1:50pm UTC](https://discourse.gohugo.io/t/gallery-module-error-message/46307/8 "2023-09-26T13:50:24Z")

</div>

Hello there,

Would anyone be able to help? I have tried to posted it as a potential bug on the Hugo github page (because it really looks like it given my previous attempts to find the source of the problem), but it was closed and I was suggested to post on the forum… so here I am again here!

---

<div class="post-metadata">

**Author:** ![chrillek](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/chrillek/32/19797_2.png) [@chrillek](https://discourse.gohugo.io/u/chrillek)\
**Post date:** [September 26, 2023, 1:57pm UTC](https://discourse.gohugo.io/t/gallery-module-error-message/46307/9 "2023-09-26T13:57:42Z")

</div>

Your chances to get help here are a lot better if you post a link to a minimal repository showing the problem. Given that many people work regularly with images in Hugo, its rather improbable that you found a bug in Hugo nobody else has noticed before.

---

<div class="post-metadata">

**Author:** ![Marta\_Karas](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/marta_karas/32/20761_2.png) [@Marta\_Karas](https://discourse.gohugo.io/u/Marta_Karas)\
**Post date:** [November 26, 2023, 5:25am UTC](https://discourse.gohugo.io/t/gallery-module-error-message/46307/10 "2023-11-26T05:25:41Z")

</div>

Hello! I have just spent over an hour debugging a similar error. I believe in my case, it was .DS\_store file that was randomly appearing in assets/media/albums/demo for me.

---

<div class="post-metadata">

**Author:** ![huebli](https://avatars.discourse-cdn.com/v4/letter/h/54ee81/32.png) [@huebli](https://discourse.gohugo.io/u/huebli)\
**Post date:** [December 17, 2023, 9:37am UTC](https://discourse.gohugo.io/t/gallery-module-error-message/46307/11 "2023-12-17T09:37:38Z")

</div>

I had the same problem. That was the crucial tip to resolve the issue, thanks!  
Maybe the gallery module should be changed to ignore these hidden file.
