How to convert base64 to Image and show in Picture Control, K2

  • 9 January 2019
  • 1 reply

I have a textbox which i used to point a base64 string, I been able to use the javascript to get the base 64 string now i want to have it to show the image on picturebox control, how do i go about this, kindly let me know.

1 reply

Badge +11

The picture control isn't what you need.  The picture control stores its picture on the K2 server so they can be packaged up and moved to a new environment without having to manually move your pictures.  


What you could use is a data label with the literal checkbox set.  Set the text of the data label to an <img> tag  and use an inline base-64 encoded image.  It's actually pretty easy and you may even be able to do it with an expression instead of javascript.  Here is an example of inline image data:

inline images.