Issue Feature Closed

#41347ImageViewHelper: more flexible arguments

Thomas Luzat 09/25/12, 12:56 updated 05/17/17, 20:09

Description

Many features of getImgResource are currently not available through the view helper. It is unlikely that all functionality can easily be offered. I propose to at least allow passing arbitrary arguments as done with the attached patch. Usage example which converts an image to grayscale and adjusts its brightness:

<f:image src="{image}" alt="" params="{ params: '-level 0%,100%,5.0 -colorspace Gray' }" />

One may consider limiting the implementation to only allow passing ImageMagick params, which would be fine for my use case and would lead to:

<f:image src="{image}" alt="" params="-level 0%,100%,5.0 -colorspace Gray" />

This would obviously disallow passing other additional arguments to getImgResource.

Reviews 1