This documentation is for an outdated version: 14.6.13. The current version is 14.6.14 - get the documentation here.

JavaScript Image Scaling

To use JavaScript Image Scaling, the images option for the URL API has to be activated:

    <url images="true" />

The scaling of images in JavaScript is accomplished via the ai.urls.composeImageUrl() function and supports all the parameters described in Image Scaling.

An example for the usage of the JavaScript URL API:

var img_src = ai.urls.composeImageUrl('foo.jpg', {'scaling-width': '50%', quality: 80});

See the JavaScript URL API for details.