# Finding asset (and other) orphans

**URL:** <https://talk.jekyllrb.com/t/finding-asset-and-other-orphans/3777>\
**Category:** Help\
**Created:** [January 4, 2020, 10:06pm UTC](https://talk.jekyllrb.com/t/finding-asset-and-other-orphans/3777 "2020-01-04T22:06:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaelbach](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelbach/32/2151_2.png) [@michaelbach](https://talk.jekyllrb.com/u/michaelbach)\
**Post date:** [January 4, 2020, 10:06pm UTC](https://talk.jekyllrb.com/t/finding-asset-and-other-orphans/3777/1 "2020-01-04T22:06:40Z")

</div>

Dear Jekyll community:

This is my first post after using Jekyll for a year, thank you for a wonderful tool! Several hundred pages are now handled by Jekyll in a very organised manner, especially my illusion pages

> **[136 Visual Phenomena & Optical Illusions](https://michaelbach.de/ot/)**
>
> This huge collection of non-scary optical illusions and fascinating visual phenomena emphasizes interactive exploration, beauty, and scientific explanation.

  
and I have successfully created plugins. Now comes the question: In DreamWeaver, which I formerly used, there were ways to search for orphans in the sense of assets (e.g. images) not referenced anywhere. I have not found any automated way to do this – suggestions please?

Looking forward to any advice,  
best regards, Michael

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [January 4, 2020, 11:25pm UTC](https://talk.jekyllrb.com/t/finding-asset-and-other-orphans/3777/2 "2020-01-04T23:25:33Z")

</div>

I don’t think there is anything in jekyll to can do that, but you could probably use gulp to do it, a quick google search found:

> **[gulp-unused-images](https://www.npmjs.com/package/gulp-unused-images)**
>
> Attempts to list images that are not used

I use gulp to build my site and handle all assets, works really well and make jekyll quicker. Though it can be complicated.

---

<div class="post-metadata">

**Author:** ![michaelbach](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelbach/32/2151_2.png) [@michaelbach](https://talk.jekyllrb.com/u/michaelbach)\
**Post date:** [January 4, 2020, 11:41pm UTC](https://talk.jekyllrb.com/t/finding-asset-and-other-orphans/3777/3 "2020-01-04T23:41:26Z")

</div>

Wow, thank you, that was fast AND helpful. So gulp seems to be a javascript library that I can run in node. Ok, will have to look into that in detail.

Thanks again, best, Michael

---

<div class="post-metadata">

**Author:** ![chuckhoupt](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chuckhoupt/32/523_2.png) [@chuckhoupt](https://talk.jekyllrb.com/u/chuckhoupt)\
**Post date:** [January 5, 2020, 4:31am UTC](https://talk.jekyllrb.com/t/finding-asset-and-other-orphans/3777/4 "2020-01-05T04:31:36Z")

</div>

Another way to test for unused files is to use a web-crawler like `wget` to download a site and compare it with `_site/` – any difference means that some files are unused. Here’s an example Makefile rule to do this test:

> <https://github.com/AppliedLogicSystems/ALSProlog/blob/master/docs/GNUmakefile#L66-L70>

---

<div class="post-metadata">

**Author:** ![michaelbach](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelbach/32/2151_2.png) [@michaelbach](https://talk.jekyllrb.com/u/michaelbach)\
**Post date:** [January 5, 2020, 12:55pm UTC](https://talk.jekyllrb.com/t/finding-asset-and-other-orphans/3777/5 "2020-01-05T12:55:43Z")

</div>

That’s a neat idea, and with code! Thank you. Best, Michael
