# How to query for images linked with documents

**URL:** <https://community.bloomreach.com/t/how-to-query-for-images-linked-with-documents/1159>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [June 10, 2019, 8:26pm UTC](https://community.bloomreach.com/t/how-to-query-for-images-linked-with-documents/1159 "2019-06-10T20:26:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vishwanath\_pandeya](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/vishwanath_pandeya/32/399_2.png) [@Vishwanath\_pandeya](https://community.bloomreach.com/u/Vishwanath_pandeya)\
**Post date:** [June 10, 2019, 8:26pm UTC](https://community.bloomreach.com/t/how-to-query-for-images-linked-with-documents/1159/1 "2019-06-10T20:26:20Z")

</div>

We have certain documents types where we have images linked to their corresponding documents. We use SQL queries like below to query from the repository about the various documents of those document types.  
select attribute1, attribute2 from documentType.

But we are not able to list out the linked images for those documents with the above queries.  
Kindly help me to query images linked with documents.

---

<div class="post-metadata">

**Author:** ![mathijs](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/mathijs/32/26_2.png) [@mathijs](https://community.bloomreach.com/u/mathijs)\
**Post date:** [June 14, 2019, 3:14pm UTC](https://community.bloomreach.com/t/how-to-query-for-images-linked-with-documents/1159/2 "2019-06-14T15:14:49Z")

</div>

Hi Vishwanath,

If you construct those queries in an HST component or JAX-RS resource, the Fluent Search API probably helps you out: [https://documentation.bloomreach.com/library/concepts/fluent-search/hst-fluent-search.html](https://documentation.bloomreach.com/library/concepts/fluent-search/hst-fluent-search.html)

hope that helps,

Mathijs
