i should add this:
<?php
$img = array('somedomain.com/foo.jpg');
$img = imagecreatefromjpeg($img[0]);
imagetruecolortopalette($img, false, 256); // convert
$white = imagecolorresolve($img, 255, 255, 255); // resolve given palette entry
imagecolortransparent($img, $white);
header("Content-type: image/gif");
imagegif($img);
?>
i understand that... but i need it to be displayed inline