# Retrieving Base64 Images from SQL Databases

**URL:** <https://forum.inductiveautomation.com/t/retrieving-base64-images-from-sql-databases/80046>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [October 5, 2023, 12:58am UTC](https://forum.inductiveautomation.com/t/retrieving-base64-images-from-sql-databases/80046 "2023-10-05T00:58:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 5, 2023, 1:22am UTC](https://forum.inductiveautomation.com/t/retrieving-base64-images-from-sql-databases/80046/2 "2023-10-05T01:22:37Z")

</div>

Consider just storing the bytes directly in your DB ("blob" aka "binary large object" or "byte array" column types). Most databases support this, your database will consume 25% less space, and you won't burn CPU cycles encoding and decoding base64 at every turn.

You can also dramatically improve Perspective performance in tables or repeating views containing images by **not** including data URLs in your tables/queries, but defer to a WebDev or a my free [Blob Server module](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970/48) to supply `src` to image components. Those data URLs of yours are horribly inefficient.

> [@David\_Stone](#):
>
> struggling through making Base64 images work .... there is no clear information on how to do this

Not an accident. There ~~'s~~ _ **was** _ no clear information because it is not a good approach.

---

_[View the full topic](https://forum.inductiveautomation.com/t/retrieving-base64-images-from-sql-databases/80046)._
