filemtime($img_to)) { $thumbnail = new sfThumbnail($width, $height); $thumbnail->loadFile($img_from); $thumbnail->save($img_to); } return image_path($thumb, $absolute); } /** * Get the tag to include a thumbnail into your web page * * @param string $source * @param int $width * @param int $height * @param mixed $options * @return string */ function thumbnail_tag($source, $width, $height, $options = array()) { $img_src = thumbnail_path($source, $width, $height, false); return image_tag($img_src, $options); }