# REST API path to image located on server

**URL:** <https://forum.shopware.com/t/rest-api-path-to-image-located-on-server/66872>\
**Category:** Programmierung\
**Created:** [12. Mai 2020 um 09:09 UTC](https://forum.shopware.com/t/rest-api-path-to-image-located-on-server/66872 "2020-05-12T09:09:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickitatkach](https://avatars.discourse-cdn.com/v4/letter/n/a587f6/32.png) [@nickitatkach](https://forum.shopware.com/u/nickitatkach)\
**Post date:** [12. Mai 2020 um 09:09 UTC](https://forum.shopware.com/t/rest-api-path-to-image-located-on-server/66872/1 "2020-05-12T09:09:11Z")

</div>

Hi,

&nbsp;

I am trying to attach an image located on shopware website server&nbsp;to article.

I send link like this: {“link”: “file:///var/www/shopware/media/image/brot.jpg”}.

But server says:&nbsp;“Error&nbsp;message:&nbsp;Could&nbsp;not&nbsp;open&nbsp;file:///var/www/shopware/media/image/brot.jpg&nbsp;for&nbsp;reading”.

I have access to FTP and media/image folder is located under httpdocs.

I have already tried different variants but without sucess (for instance, “file:///media/image/brot.jpg”, “file:///httpdocs/media/image/brot.jpg”)

&nbsp;

I think the problem is in path itself. Could you please help me with this?

&nbsp;

Thanks.

---

<div class="post-metadata">

**Author:** ![sacrofano](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@sacrofano](https://forum.shopware.com/u/sacrofano)\
**Post date:** [12. Mai 2020 um 09:50 UTC](https://forum.shopware.com/t/rest-api-path-to-image-located-on-server/66872/2 "2020-05-12T09:50:44Z")

</div>

I use the URL from Webserver like

```
 {"link": "https://some_url/media/image/brot.jpg"}

```

&nbsp;

---

<div class="post-metadata">

**Author:** ![nickitatkach](https://avatars.discourse-cdn.com/v4/letter/n/a587f6/32.png) [@nickitatkach](https://forum.shopware.com/u/nickitatkach)\
**Post date:** [12. Mai 2020 um 09:55 UTC](https://forum.shopware.com/t/rest-api-path-to-image-located-on-server/66872/3 "2020-05-12T09:55:22Z")

</div>

Wow…

&nbsp;

Thank you very much!
