use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Photo;
+use Friendica\Util\Network;
use Exception;
use Imagick;
use ImagickPixel;
{
$data = [];
+ if (empty($url)) {
+ return $data;
+ }
+
$data = Cache::get($url);
if (is_null($data) || !$data || !is_array($data)) {
- $img_str = fetch_url($url, true, $redirects, 4);
+ $img_str = Network::fetchUrl($url, true, $redirects, 4);
$filesize = strlen($img_str);
if (function_exists("getimagesizefromstring")) {
$width = $Image->getWidth();
$height = $Image->getHeight();
- $hash = photo_new_resource();
+ $hash = Photo::newResource();
$smallest = 0;