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
3 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
1

Hello, This is little late answer for you but just that to add answer on this question, you have to give path like img\MyFirstModule$Images$one.jpg ---> here if you have stored the images in image default folder then that folder name is img in directory if you check now go to that directory and check what name is coming there beacause here i have added my img name as one but if I check in directory path then they have stored our img name MyFirstModule$Images$one.jpg like this Thanks:)

answered