bfi_thumb icon indicating copy to clipboard operation
bfi_thumb copied to clipboard

Crop defaults to true, added behaviour to crop = false

Open jbjanot opened this issue 11 years ago • 0 comments

For now, the crop parameter was unused. It is now set to true by default. If you pass crop: false to the parameters, il will resize, but without cropping.

Exemple with a 1200px x 800px source image image

bfi_thumb("URL-to-image.jpg", array(
    'width' => 100,
    'height' => 100
));

This code will result, as expected, in a 100 x 100 pixels image. image

Yet, if you use this syntax :

bfi_thumb("URL-to-image.jpg", array(
    'width' => 100,
    'height' => 100,
   'crop' => false
));

It will result in an image that is 100 x 67 pixels, and not cropped. image

Of course, you can still grow images. And by the way, I used an autoformat tool... Hope you don't mind ;)

jbjanot avatar Nov 19 '14 13:11 jbjanot