A common use-case for a CMS is to store images and be able to serve out multiple renditions of that image. Hippo CMS has this functionality built-in, but is rather cumbersome to use and difficult to change once you've made up your mind.
To get around this XIN Mods include the
/assetmod extension. A simple image operations
interpreter that can help: scale, crop and apply other types of filters.
Simply prefix any
/binaries URLs with the
/assetmod/<operations>/... construct. For example:
As you may have noticed, you can specify multiple operations. They are structured like this to make it easier for caches to cache them.
Available operations are:
scale=_,<new-height>; scale the image to a new height (keeping aspect ratio intact)
scale=<new-width>,_; scale the image to a new width (keeping aspect ratio intact)
crop=<max-width>,<max-height>; crop zoom the image to
filter=brighter; turn up the brightness of the image a little
filter=darker; the image becomes a little bit darker
filter=greyscale; the image because black and white
Getting started with XIN Mods is easy!
Read more »