$image_in=$ENV{DOCUMENT_ROOT}.'/img/1.jpg'; #example, might have ENV DOC ROOT on your server, need full pathof some sort though $image_out=$ENV{DOCUMENT_ROOT}.'/img/.thumb.1.jpg'; #whatever you want to call it. thumbnail($image_in, $image_out,80,'square',90);