# Getting duplicate image post entries in simple gallery loop

**URL:** <https://talk.jekyllrb.com/t/getting-duplicate-image-post-entries-in-simple-gallery-loop/8725>\
**Category:** Help\
**Created:** [December 1, 2023, 6:01am UTC](https://talk.jekyllrb.com/t/getting-duplicate-image-post-entries-in-simple-gallery-loop/8725 "2023-12-01T06:01:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Digger](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@Digger](https://talk.jekyllrb.com/u/Digger)\
**Post date:** [December 1, 2023, 6:01am UTC](https://talk.jekyllrb.com/t/getting-duplicate-image-post-entries-in-simple-gallery-loop/8725/1 "2023-12-01T06:01:31Z")

</div>

Hi all, hoping you can help. I posted yesterday about this but my post got removed due to the spambot. No idea why but it might be cos I included links.

So, Im developing a gitub pages site and I need help about why my simple gallery images are printing twice.

Code

```auto
<!-- gallery html from https://dmnfarrell.github.io/software/jekyll-galleries -->
<div class="thumb-wrap"><div id="image-gallery">
    {% assign sorted = site.static_files | sort: 'date' | reverse %}
    {% for file in sorted %}
    {% if file.path contains include.folder %}
    {% if file.extname == '.jpg' or file.extname == '.png' %}
    {% assign filenameparts = file.path | split: "/" %}
    {% assign filename = filenameparts | last | replace: file.extname " " %}
    <div class="box">
    <a href="{{site.baseurl}}{{ site.imagesurl }}{{ include.folder }}/{{ file.name }}" title="{{ filename }}"><img src="{{site.baseurl}}{{ site.thumbsurl }}{{ include.folder }}/{{ file.name }}" alt="{{ filename }}" class="img-gallery" /> </a>
    </div>
    {% endif %}
    {% endif %} 
    {% endfor %} 
</div></div>

```

Im declaring imagesurl and thumbsurl in the config yaml.

```auto
imagesurl: "/assets/galleries/"
thumbsurl: "/assets/thumbs/"

```

The method Im using is from Damien Farrell. I wont link to his blogpost in case this post is removed again due to spambot. I can share my repo and the site url but wont in case spambot 🙂

---

<div class="post-metadata">

**Author:** ![Digger](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@Digger](https://talk.jekyllrb.com/u/Digger)\
**Post date:** [December 3, 2023, 6:17am UTC](https://talk.jekyllrb.com/t/getting-duplicate-image-post-entries-in-simple-gallery-loop/8725/2 "2023-12-03T06:17:28Z")

</div>

This post was held up in spam bin for 2 days, and the post it refers to is still held in spam. Since then I have solved the issue by completely replacing the dmfarrell liquid data call which does not work.

tbh Im a bit disappointed in the spam bot as Ive posted before and not had the akismet problem. If we cant post and get help in a timely fashion then what is the point of the forum??
