<p>The part you're referring to in the docs is when you're importing assets into a volume, not when importing assets as part of entries.</p>
<p>I'm not sure how you have things set up, but you could create a new assets volume for your instagram posts and import to that instead. You can then use the title, or any other bit of data to rename the file (I believe). You could then retrieve all the assets from that volume in your templates: <code>craft.assets.volume('instagram').all()</code></p>
<p>Failing that you can write a <a href="https://craftcms.com/docs/3.x/extend/module-guide.html" rel="nofollow noreferrer">simple module</a> and use a <a href="https://docs.craftcms.com/feed-me/v4/developers/events.html#feed-processing-related-events" rel="nofollow noreferrer">hook</a> to re-name each file on import.</p>

CC BY-SA 4.0
2021-06-08T22:23:29.497Z
Thanks for taking the time to answer!  This was a huge help.  Sometimes it takes another set of eyes to help find the obvious.

This got me half way there.  With FeedMe you can select a field to rename the images you are saving to a volume, but that field needs to actually *be* a filename with an extension.  I tried using the title (which is the ID of the Instagram post) but was getting errors.  

I ended up just pulling in all the fields I needed, and then built an RSS feed from the entries - for the title, I pulled in the id, and just appended a ".jpg" and now everything is all well.
gjhead
CC BY-SA 4.0
2021-06-09T08:44:43.173Z
Glad you're sorted!
dmatthams
CC BY-SA 4.0
2021-06-08T17:36:23.000Z
2021-06-08T17:36:23.000Z
dmatthams
<p>I'm using Feed-Me to import a json file from Instagram.  The filenames I get for my images from Instagram are MEGA long.  Feed-Me is also changing any _ in the name to a space.  I'm looking for a way to rename the images once I import them into an Asset volume.</p>
<p>The Feed-Me docs say that &quot;Not only can you use Asset importing to create/upload image files, you can also use it to update them, changing things like custom fields, titles, or even filenames.&quot;  But I can't find this setting anywhere.  Anyone know if this is possible either with Feed-Me or some other way?</p>

<assets><plugin-feedme>
Rename Assets on Import?
# Rename Assets on Import?

(Asked by: username_0 on 2021-06-04)

I'm using Feed-Me to import a json file from Instagram. The filenames I get for my images from Instagram are MEGA long. Feed-Me is also changing any \_ in the name to a space. I'm looking for a way to rename the images once I import them into an Asset volume.

The Feed-Me docs say that "Not only can you use Asset importing to create/upload image files, you can also use it to update them, changing things like custom fields, titles, or even filenames." But I can't find this setting anywhere. Anyone know if this is possible either with Feed-Me or some other way?

**Tags:** assets, plugin-feedme


---

## 1 answers

### Answer by username_1 on 2021-06-08. Score: 2 | Accepted answer

The part you're referring to in the docs is when you're importing assets into a volume, not when importing assets as part of entries.

I'm not sure how you have things set up, but you could create a new assets volume for your instagram posts and import to that instead. You can then use the title, or any other bit of data to rename the file (I believe). You could then retrieve all the assets from that volume in your templates: `craft.assets.volume('instagram').all()`

Failing that you can write a [simple module](https://craftcms.com/docs/3.x/extend/module-guide.html) and use a [hook](https://docs.craftcms.com/feed-me/v4/developers/events.html#feed-processing-related-events) to re-name each file on import.

> **Comments:**
> **username_0**: Thanks for taking the time to answer!  This was a huge help.  Sometimes it takes another set of eyes to help find the obvious.  This got me half way there.  With FeedMe you can select a field to rename the images you are saving to a volume, but that field needs to actually *be* a filename with an extension.  I tried using the title (which is the ID of the Instagram post) but was getting errors.    I ended up just pulling in all the fields I needed, and then built an RSS feed from the entries - for the title, I pulled in the id, and just appended a ".jpg" and now everything is all well.  
> **username_1**: Glad you're sorted!  

---

