Skip to main content
1-Visitor
December 18, 2020
Solved

How to read any image from SystemRepository using Service and display on image widget

  • December 18, 2020
  • 2 replies
  • 1167 views

Pls help on this logic

Best answer by Ashritha

Since Image widget uses the Media entity to display image, it is not possible to display image from System Repository using Image widget. Instead use following steps :

Use Service :

var Content = Things["SystemRepository"].LoadImage({
path: undefined /* STRING */ 
});

path: complete path of image

 

Use Value Display widget :

  1. Bind output of above service to value display
  2. Click on Render and State
  3. Change the Renderer to Image in the drop down
  4. Done and Save

2 replies

Ashritha15-MoonstoneAnswer
15-Moonstone
December 18, 2020

Since Image widget uses the Media entity to display image, it is not possible to display image from System Repository using Image widget. Instead use following steps :

Use Service :

var Content = Things["SystemRepository"].LoadImage({
path: undefined /* STRING */ 
});

path: complete path of image

 

Use Value Display widget :

  1. Bind output of above service to value display
  2. Click on Render and State
  3. Change the Renderer to Image in the drop down
  4. Done and Save
5-Regular Member
December 18, 2020

 Hi @ranjank ,

If above response has answered your question, please mark as Accepted Solution, for the benefit of others who may have the same question.