<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
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();
}