# Creating a file from a tag plugin

**URL:** <https://talk.jekyllrb.com/t/creating-a-file-from-a-tag-plugin/1963>\
**Category:** Help\
**Created:** [July 11, 2018, 2:18pm UTC](https://talk.jekyllrb.com/t/creating-a-file-from-a-tag-plugin/1963 "2018-07-11T14:18:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hadmut](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@hadmut](https://talk.jekyllrb.com/u/hadmut)\
**Post date:** [July 11, 2018, 2:18pm UTC](https://talk.jekyllrb.com/t/creating-a-file-from-a-tag-plugin/1963/1 "2018-07-11T14:18:56Z")

</div>

Hi,

I’d like to create a plugin for a custom liquid tag, which both creates some tag result and a binary file (i.e. creates an html img element inside the document, and an image file to be used with it).

However, simply creating the image file – there is no equivalent in the source tree, it’s like a generator task – does not help since jekyll does not recognise this as a wanted file and immediately deletes it.

How do I tell jekyll to keep that file and not erase it?
