# Converting varbinary to base64 for perspective image component

**URL:** <https://forum.inductiveautomation.com/t/converting-varbinary-to-base64-for-perspective-image-component/81202>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [October 30, 2023, 9:24pm UTC](https://forum.inductiveautomation.com/t/converting-varbinary-to-base64-for-perspective-image-component/81202 "2023-10-30T21:24:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Isaac\_Hodgkins](https://avatars.discourse-cdn.com/v4/letter/i/59ef9b/32.png) [@Isaac\_Hodgkins](https://forum.inductiveautomation.com/u/Isaac_Hodgkins)\
**Post date:** [October 30, 2023, 9:24pm UTC](https://forum.inductiveautomation.com/t/converting-varbinary-to-base64-for-perspective-image-component/81202/1 "2023-10-30T21:24:26Z")

</div>

I've followed some other forum posts for converting a png stored as a varbinary in a sql server database to a base64 string that can be used by the image component, but the component won't read the image. I believe it has something to do with my script converting the value from a scalar back to an array after my transform. Any ideas why "value" in the transform is not returning the same scalar value from the named query? Thanks!

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/9/19675291aca9cc03534179ef5766f940f9a54647.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/7/e77ef196a10e83456d25da46df8f2cd5635e603c.png)
