# Add images to API posts

**URL:** <https://meta.discourse.org/t/add-images-to-api-posts/204651>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [September 28, 2021, 2:07pm UTC](https://meta.discourse.org/t/add-images-to-api-posts/204651 "2021-09-28T14:07:43Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)\
**Post date:** [August 8, 2022, 8:47am UTC](https://meta.discourse.org/t/add-images-to-api-posts/204651/7 "2022-08-08T08:47:31Z")

</div>

> [@Chittaranjan\_Jena](#):
>
> I am trying to post an image to post using the img tag like below but it’s not showing?

You can just add the url to the image without any html img tags

`https://unsplash.com/photos/JoZazcPhW5Y`

like this

> **[Photo by Keshaun Slevinsky on Unsplash](https://unsplash.com/photos/a-person-holding-a-camera-JoZazcPhW5Y)**
>
> Download this photo by Keshaun Slevinsky on Unsplash

and discourse will onebox it. But that isn’t even a link to an image, that just link to a page on the [unsplash.com](http://unsplash.com) website. You will need to use the actual link for the image:

`https://images.unsplash.com/photo-1658603458978-4a32b8cdadb7?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3272&q=80`

 ![](https://global.discourse-cdn.com/meta/original/4X/d/5/7/d576ab639d23c7f98e3364a3a732941979acb16c.jpeg)

If you are using the api, you can include the image url in the ‘raw’ field of the post.

---

_[View the full topic](https://meta.discourse.org/t/add-images-to-api-posts/204651)._
