- $img_str = fetch_url($pictures[0][1]);
-
- $tempfile = tempnam(get_config("system","temppath"), "cache");
- file_put_contents($tempfile, $img_str);
- $mime = image_type_to_mime_type(exif_imagetype($tempfile));
- unlink($tempfile);
- if (substr($mime, 0, 6) == "image/") {
+ $imgdata = get_photo_info($pictures[0][1]);
+ if (substr($imgdata["mime"], 0, 6) == "image/") {