View file data/image.php
<?php $nw=100; //размеры $nh=100; $file=htmlspecialchars($_GET['file']); list(, , $type,)=getimagesize($file); if($type==1) { $func='imagecreatefromgif'; } if($type==2) { $func='imagecreatefromjpeg'; } if($type==3) { $func='imagecreatefrompng'; } if($type) { $scr= $func($file); $scrnew = imagecreatetruecolor($nw,$nh); imagecopyresized($scrnew,$scr,0,0,0,0,$nw,$nh,imagesx($scr),imagesy($scr)); header ('Content-type: image/gif'); imagegif($scrnew); } ?>