Forum Discussion
how can we extract an image from the article body using LIQL query ?
- Payal8 years agoDirectorHi rahulsrao24,
You can extract images from the article by using following LIQL query:
SELECT * FROM images WHERE messages.id = '[ID]'
LMK if this works for you.
Thanks!!- rahulsrao248 years agoGuide
Hello,
I tried the the query on the API browser.
The status of the query shows as Success. But the result set shows up as empty though there are images
in the body of the article.
- VikasB8 years agoBoss
Hi rahulsrao24 Both the queries(V1 & V2) would work perfectly.
/restapi/vc/messages/id/[ID]/images
SELECT * FROM images WHERE messages.id = '[ID]'
But these APIs would not fetch the images which are not hosted on lithium.
As in attached image, there are two images one hosted on lithium and other one hosted somewhere else. Here API would fetch only one image which is hosted/uploaded on the lithium community
On the front end, both images will look same but you can check the difference in HTML mode(edit message --> Select HTML tab) of the message. Lithium uploaded images would be wrapped inside the <li-image>.
Related Content
- 2 years ago
- 7 months ago
- 2 years ago