use Friendica\Model\Contact;
use Friendica\Model\Photo as MPhoto;
use Friendica\Util\Proxy;
+use Friendica\Object\Image;
/**
* Photo Module
// if customsize is set and image is not a gif, resize it
if ($photo['type'] !== "image/gif" && $customsize > 0 && $customsize < 501) {
- $img = MPhoto::getImageForPhoto($photo);
+ $img = new Image($imgdata, $photo['type']);
$img->scaleToSquare($customsize);
$imgdata = $img->asString();
}