How to display Image from url

0
Hello. I want to display image from url in a attribute of a entity. And, I found widgets like Image Viewer in App Store. But, I got error when I tried to run “The entity {My attribute} cannot be used here, because it is not persistable.”   So, I couldn’t use these widgets in app store because my entity which has url was not persistable. Is there any way to display image from url?      
asked
1 answers
1

Try HTMLSnippet with CTX, something like this

if(
    this.contextObj!=null
){
    try{
        this.domNode.innerHTML=`<img src="${this.contextObj.get("NAME_OF_YOUR_ATTRIBUTE")}"></img>`;
    }catch(e){
        this.domNode.innerHtml=`<div class="alert alert-danger">${e.toString()}</div>;`
    }
}else{
        this.domNode.innerHtml='<div class="alert alert-danger">Context object NULL</div>';
}

 

answered