Image resize (thumb image) keeps the aspect ratio
Permalink
Hi,
I am looking for a simple solution that keeps the aspect ration on getThumbnail() function.
$ih = Loader::helper('image');
$thumb = $ih->getThumbnail($image, 307, ?);
In this case I only need to re-size width, the height will automatically re-sized based on the aspect ratio.
Looking for the expert helps.
Thanks,
I am looking for a simple solution that keeps the aspect ration on getThumbnail() function.
$ih = Loader::helper('image');
$thumb = $ih->getThumbnail($image, 307, ?);
In this case I only need to re-size width, the height will automatically re-sized based on the aspect ratio.
Looking for the expert helps.
Thanks,
Hope this helps!