img.php: try to create thumbnail only once