Update lib/photo.php