image not found in html snippet

0
Hi friends,     Image not found while passing a image in html snippet. Is that possible to show an image from html widget? If yes, please guide me from which path I should pass the image
asked
2 answers
1

Is there a specific reason you need to show the image in the html snippet widget? Why not use the image widget for this?

And where are the images stored?

answered
1

Try something along these lines with the HTMLSnippet with context

 

try{
  if(
      this.contextObj!=null
  ){
    this.domNode.append(
      dojo.create(
        'img',
        {
          'src':'/file?guid='+this.contextObj.getGuid()+'?cachebust='+(new Date().getTime())
        }
      );
    );
  }else{
    dojo.empty(
      this.domNode
    );
  }
}catch(e){
}

 

answered