cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Base64 URL with Image Widget

Sathishkumar_C
17-Peridot

Base64 URL with Image Widget

Is it possible to load base64 string as source URL to image widget and display the image?

 

I tried as below with jpeg image, but it's not working... It doesn't showing any Image. just white space.

 

Sathishkumar_C_0-1668172347454.png

 

Example: Display Base64 Images in HTML

ACCEPTED SOLUTION

Accepted Solutions

Hi @Sathishkumar_C.

 

ThingWorx 9.3.8 has been released.  Please validate the fix for this issue is as expected.

 

Regards.

 

--Sharon

View solution in original post

6 REPLIES 6

I tried using "Image" widget and "ValueDisplay" and both were working fine on TWX 9.1.1:

nmutter_1-1668525971775.png

 

 

- ValueDisplay-widget you can set the renderer to "Image"

nmutter_0-1668525692738.png

and set the data to your <base64_string> without the prefix - it automatically seems to add "data:image/png;base64," to it

 

Image widget choose "ImageURL" and paste the whole string ( I used the example from your linked page).

nmutter_2-1668526002893.png

 

You need to adapt the width/height of the image urself.

 

Edit: attached my sample mashup 

Thanks for the replay. I'm fine with given suggestion.

But, I reframe the question... When I'm trying to pass base64 string as dynamic source URL to image widget. Its giving me a whitespace.

 

The same working with Value Display. I want use image widget with source URL with base64 string.

I also tried to bind it but was not yet successful. It always puts the hostname before the base64 string - e.g. "https://localhost/data&colon;image png...." which does not work

to explain how to set imageURL in the MashupBuilder: You need to click on the "+" at "Search Media" and there select "+ New Image URL":

nmutter_0-1669368797579.png

Then you get the "Image URL" Popup from my post above

As of now, don't have solution for this. PTC team confirmed, this feature will be available from Thingworx 9.3.8.

Hi @Sathishkumar_C.

 

ThingWorx 9.3.8 has been released.  Please validate the fix for this issue is as expected.

 

Regards.

 

--Sharon

Announcements


Top Tags