- b2evolution CMS User Manual
- Installation / Upgrade
- Configuration files
- _advanced.php
- Variables that control Image manipulation
Variables that control Image manipulation
Thumbnail Sizes
These are the thumbnail size definitions. This also gets used for general resizing, e.g. in the Profile Picture Widget.
$thumbnail_sizes = array(
'fit-1280x720' => array( 'fit', 1280, 720, 85 ),
'fit-720x500' => array( 'fit', 720, 500, 90 ),
'fit-640x480' => array( 'fit', 640, 480, 90 ),
'fit-520x390' => array( 'fit', 520, 390, 90 ),
'fit-400x320' => array( 'fit', 400, 320, 85 ),
'fit-320x320' => array( 'fit', 320, 320, 85 ),
'fit-256x256' => array( 'fit', 256, 256, 85 ),
'fit-192x192' => array( 'fit', 192, 192, 85 ),
'fit-160x160' => array( 'fit', 160, 160, 80 ),
'fit-160x160-blur-13' => array( 'fit', 160, 160, 80, 13 ),
'fit-160x160-blur-18' => array( 'fit', 160, 160, 80, 18 ),
'fit-160x120' => array( 'fit', 160, 120, 80 ),
'fit-128x128' => array( 'fit', 128, 128, 80 ),
'fit-80x80' => array( 'fit', 80, 80, 80 ),
'crop-480x320' => array( 'crop', 480, 320, 90 ),
'crop-256x256' => array( 'crop', 256, 256, 85 ),
'crop-192x192' => array( 'crop', 192, 192, 85 ),
'crop-128x128' => array( 'crop', 128, 128, 85 ),
'crop-80x80' => array( 'crop', 80, 80, 85 ),
'crop-64x64' => array( 'crop', 64, 64, 85 ),
'crop-48x48' => array( 'crop', 48, 48, 85 ),
'crop-32x32' => array( 'crop', 32, 32, 85 ),
'crop-15x15' => array( 'crop', 15, 15, 85 ),
'crop-top-320x320-blur-8' => array( 'crop-top', 320, 320, 80, 8 ),
'crop-top-320x320' => array( 'crop-top', 320, 320, 85 ),
'crop-top-200x200' => array( 'crop-top', 200, 200, 85 ),
'crop-top-160x160' => array( 'crop-top', 160, 160, 85 ),
'crop-top-80x80' => array( 'crop-top', 80, 80, 85 ),
'crop-top-64x64' => array( 'crop-top', 64, 64, 85 ),
'crop-top-48x48' => array( 'crop-top', 48, 48, 85 ),
'crop-top-32x32' => array( 'crop-top', 32, 32, 85 ),
'crop-top-15x15' => array( 'crop-top', 15, 15, 85 ),
);
The params for each defined size are:
- type :
- fit will preserve the image dimensions ratio and reduce the image to make it fit into the specified dimensions
- crop will crop exactly to the required dimensions
- crop-top will crop by using preferably the top of picture (where the faces tend to be, when cropping vertical pictures)
- width (or max height in case of "fit")
- height (or max height in case of "fit")
- quality (for JPEG compression)
- percent of blur effect
See: Image Size.
Image Resampling
$resample_all_images
: By default, images get copied into b2evo cache without resampling if they are smaller than requested thumbnails.
If you want to use the BeforeThumbCreate event (such as the case with the Watermark Plugin), this should be set to true
to make sure that smaller images are also processed.