Crop thumbnail to exact provided thumbnail sizes
Permalink Browser Info Environment
Galleria as default does not crop images for using at thumbnail area, it uses provided Height/Width and return thumbnails with equal height and appropriate with.
If you want Galleria to return an exact Height/Width that you provide at create Galleria you should follow this instruction:
1 - Open file:
\whale_galleria\blocks\whale_galleria\controller.php
2 - At line 117 replace line:
with:
If you want Galleria to return an exact Height/Width that you provide at create Galleria you should follow this instruction:
1 - Open file:
\whale_galleria\blocks\whale_galleria\controller.php
2 - At line 117 replace line:
$tmp->thumb = $im->getThumbnail($f, $this->gallery['options']->thumbWidth, $this->gallery['options']->thumbHeight)->src;
with:
$tmp->thumb = $im->getThumbnail($f, $this->gallery['options']->thumbWidth, $this->gallery['options']->thumbHeight, true)->src;
Type: | Discussion |
---|---|
Status: | New |