Keep in mind that the 3rd param is optional. If only two params are passed to the thumb helper the thumb will resize the image maintaining the ratio. If theres a 3rd param then, by default the aspect ratio will not be maintained unless the 5th parameter is set to TRUE.

After the creation the thumb helper will return an array with the following content:

path -> The full path to the image;

thumb_marker -> The marker for the thumb, for now will always be equal to the thumb sizes that were passed to the thumb helper;

thumb_name -> The final name of the thumb;

I made this return in case someone needed to sent some of these values to the database for example.

USING REMOTE FILE:

For that insted of passing the array from image upload you can just pass the path to the file (including the file).

example:

create_thumb('./public/images/myimage.jpg', '100', '150');

CHANGELOG

version 1.0.2

Added explicit option for maintaining aspect ratio when height and width are both specified