$path_img="./pic/";
$nome_file = str_replace(".html",".gif",basename($file));

"<img src=\"$path_img."/".$nome_file\">";