Extract new image dimensions from timthumb
- by jonthoughtit
I'm using timthumb to resize my images because it scales them nicely if I only enter one of the dimensions. However I want to know if it's possible to extract the new resized image's dimensions so that I can add that dynamically to the img tag attributes.
I tried this with no luck:
$fullpath = '/lib/timthumb.php?src='.$image.'&w=100';
$my_image = array_values(getimagesize($fullpath));
list($width, $height, $type, $attr) = $my_image;
Any ideas?