Method Controller::getImage

Meta:

Written by

Leo Feyer <http://www.contao.org>

/system/libraries/Controller.php line 746
Automatically extracted PHP DOC comment from code:

Resize an image

END OF PHP DOC
protected function string getImage(string $image, integer $width, integer $height, string $mode, string $target)

Parameters

string $image

relative path to the image (TL_ROOT is automatically added)

integer $width

desired with of the image

integer $height

desired height of the image

string $mode
Default: ''

there are three modes you can use:
- exact (which is default)
- proportional
- box

you can find additional info to these three possibilities on the team blog (http://www.contao.org/blog-leser/items/die-3-varianten-der-bildanpassung-in-typolight-2.8.html) unfortunately only in German but Google Translate should do the trick. Otherwise feel free to edit the comment here =)

string $target
Default: null

can be used to save the image other than in system/html

Add a comment

Please calculate 7 plus 5.