Set Default Image when Image type is External

Set Default Image when Image type is External

  

Hi,

  When I have set Image Type as External,I want to set a Default Image in Image Widget too.

  Can anyone please help me?

Thanks.

Solution

Hi Pratima,

You can't.
Both in Mobile and Web, when you set the image to External, you are saying you want to tell the browser to download the image from somewhere else.

The image will be download from the client (browser, in web), and this means that you will not know, during the phase of screen construction in the server, if the image is available or not.

So, the only way to "replace" the image that should be downloaded for a "default" image in case the download fails is through JavaScript. 

Don't know if there is anything in Forge to help with that, but if you wants to try to use Javascript, you can take a look here: 

https://css-tricks.com/snippets/jquery/better-broken-image-handling/

Cheers,
Eduardo Jauch


Solution