OpenWGA 7.10 - OpenWGA Concepts and Features

Design and development » File derivates

File derivates and online scaling

You can combine querying of file derivates with "online scaling", the OpenWGA functionality which will scale down an image online when requested to an exactly given with. For example:

<tml:image file="photo.jpg" derivate="usage=poster,width~400" maxwidth="600"/>

This will first select a matching derivate, most likely of a width of 400 pixels or larger. Maybe it will even return the original if all derivates that exist are smaller (as usage "poster" also includes this for images).

Then online scaling will be applied to the selected derivate. If it is already up to 600 pixels width it will do nothing. But if it is larger than this then online scaling will scale it down to exactly 400 pixels. This may be far more effective than scaling the original as the derivate is most likely smaller and it takes OpenWGA less resources to do the scaling.