---
title: "Return Images in Query Results"
slug: "return-images-in-query-results"
status: "new"
updated: 2026-07-21T20:22:47Z
published: 2026-07-21T20:22:47Z
canonical: "knowledge.technolutions.net/return-images-in-query-results"
stale: true
---
> ## Documentation Index
> Fetch the complete documentation index at: https://knowledge.technolutions.net/llms.txt
> Use this file to discover all available pages before exploring further.
# Return Images in Query Results
You can return an uploaded material as an image in query results by building an HTML export that references the material stream. This pattern is useful when staff need to scan a list with visual context, such as headshots, ID images, or other record materials.
> [!TIP]
> ⭐ Get Inspired
>
> This article was adapted from [a post by Technolutions staff](https://community.technolutions.net/get-inspired/post/include-images-in-your-query-results----a-slate-bytes-example-aXDL6wxyvw97l7L) in the Slate Community Forums' Get Inspired space. Have a great idea for a Get Inspired post? [Let us know](https://community.technolutions.net/get-inspired/new?post_type=gnHx7As1gZ8r6Ld)!
## Before you begin
- The image must already be uploaded as a material on the record.
- The query must be able to join from its base record to the relevant material.
- The result will render only for users who have permission to view the material.
## Create the material join
1. Open the query that should display the image.
2. Add a join from the query base to **Materials**.
3. Add filters that restrict the join to the desired material type, such as a headshot material.
4. Add exports for the material stream and, if useful, the material GUID or memo.
## Create the image HTML export
Add a formula export that outputs an HTML `img` tag. The image source should use the material stream value in the material tile endpoint.
```xml
''
```
Replace `[stream export]` with the export or SQL expression that returns the material stream value in your query.
> [!WARNING]
> 📝 Note
>
> The exact formula syntax depends on how your query exposes the material stream value. Build and test the material join first, then add the HTML wrapper after you can return the stream value reliably.
## Return multiple images
If one record can have multiple matching images, use a dictionary subquery export and Liquid looping to render each image. The following pattern shows the HTML structure used by dashboard examples:
```xml
{% for item in images %}