Once created driven by our AdServer, images change based on established parameters ( Geolocation, weather, date/time, cookies, retargeting …).
To dynamize pictures you have 4 methods at your service :
The setImageUrl function allows you to insert an image source. You can only use it on an <img>
tag. You have to remove the src
attribute.
ADventori.Display.setImageUrl(element, data, urlDefault);
This function needs three parameters:
If you dynamize an <img>
tag , You have to remove the src
attribute.
Don’t forget to add some css to resize your picture.
The adaptImage function allows you to adapt an image size to its container.
ADventori.Display.adaptImage(element, displayOption);
This function needs two parameters:
The container of the picture targeted by this function has to be a block
element and have the following CSS properties: width
, height
.
You don’t need to add some css to resize your picture.
The addImage function allows you to insert an <img>
tag inside a container.
ADventori.Display.addImage(element, data, urlDefault);
This function needs three parameters:
<img>
tag will be inserted.Don’t forget to add some css to resize your picture.
The addAndAdaptImage function allows you to insert an image tag inside a container.
ADventori.Display.addAndAdaptImage(element, data, urlDefault, displayOption);
This function needs four parameters:
<img>
tag will be inserted.The element targeted by this function has to be a block
element and have the following CSS properties: width
, height
.