Add images to API posts

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

https://unsplash.com/photos/JoZazcPhW5Y

like this

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 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

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