# How to receive an image file via API?

**URL:** <https://community.weweb.io/t/how-to-receive-an-image-file-via-api/3300>\
**Category:** Ask us anything\
**Created:** [June 30, 2023, 11:01pm UTC](https://community.weweb.io/t/how-to-receive-an-image-file-via-api/3300 "2023-06-30T23:01:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandon](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/brandon/32/2804_2.png) [@brandon](https://community.weweb.io/u/brandon)\
**Post date:** [June 30, 2023, 11:01pm UTC](https://community.weweb.io/t/how-to-receive-an-image-file-via-api/3300/1 "2023-06-30T23:01:26Z")

</div>

I’ve got a 3rd party API that I’m trying to pull from via the REST API plugin. The issue I’m having is that this API sends an actual .png image, not a URL to the image. So when I try to make a request in WeWeb, I don’t get a response.

I have this connected in Bubble just fine but I noticed that the Data type is set to “Image”. Is there a way to receive image files via the REST API plugin or will I need to try and run this call through Xano and transform things there?

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/7/7e8b14982054abbf1876481d466fa1fb233eacb9.png)

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [July 4, 2023, 11:02pm UTC](https://community.weweb.io/t/how-to-receive-an-image-file-via-api/3300/2 "2023-07-04T23:02:55Z")

</div>

Hi @brandon 👋

My first thought is: you’ll probably need to use Xano to store the image because the image element in WeWeb needs a URL to display an image.

That said, I wasn’t able to find a lot of documentation on Keepa aside from [this YouTube tutorial](https://youtu.be/md30T67n6D8) that doesn’t really use their API. I’m curious: what happens when you make the call in a tool like Postman? What does the response look like?

 ![CleanShot 2023-07-05 at 01.01.12@2x](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/9/9889e1f4ed5a5bab67819a3025bab37ef9b60521.png)

---

<div class="post-metadata">

**Author:** ![brandon](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/brandon/32/2804_2.png) [@brandon](https://community.weweb.io/u/brandon)\
**Post date:** [July 5, 2023, 6:48pm UTC](https://community.weweb.io/t/how-to-receive-an-image-file-via-api/3300/3 "2023-07-05T18:48:44Z")

</div>

That’s what I ended up doing! I haven’t actually tested it in Postman but what I ended up doing was creating an API endpoint in Xano that:

1. Makes a request to Keepa using the provided details of the product.
2. Saves the image to Xano using a uniquely generated URL.
3. Sends that new image URL back to Xano to use as the image.

Since this will be happening hundreds of times a day with users, I’ll then create a recurring Xano task that mass deletes the images since they won’t be relevant after about 90 minutes.
