With the Twig-function {{ assets.image(string $imgurl).grayscale().src() }} you can grayscale an image on the fly. This is useful if you want to render a grayscaled version of images in the frontend, for example a list of news-boxes with preview images on the start-page.

Example Usage

Grayscale an image:

<img src="{{ assets.image(metatabs.meta.heroimage).graysacle().src() }}" />

Resize and grayscale an image:

<img src="{{ assets.image(metatabs.meta.heroimage).resize(false,500).grayscale().src() }}" />