This widget renders a drop down and two input fields for defining the output size of images. Typically you can select
a resize method in the drop down and define the width and/or height in the text fields - or you can select a predefined
image size in the drop down instead.
The predefined sizes originate either from the application configuration (“Predefined dimensions”) or the theme.
Options
This widget does not have any special options. See the DCA reference for a full field reference.
All options for the text widget are also relevant.
The options for the drop down are retrieved from the contao.image.sizes service
(Contao\CoreBundle\Image\ImageSizes) in the example below. However, you can still override these options via your own
options_callback:
The image size widget is used very often in contao. Examples are the text, image and gallery content elements. The
widget stores a serialized image size array in the database which can then be used to resize images
in your controller for example.