Simplyfied picture fetching

This commit is contained in:
Michael 2021-07-19 06:19:13 +00:00
parent 2647514603
commit fa00a4ee32

View file

@ -185,7 +185,7 @@ class Images
} }
if (Network::isLocalLink($url) && ($data = Photo::getResourceData($url))) { if (Network::isLocalLink($url) && ($data = Photo::getResourceData($url))) {
$photo = Photo::getPhoto($data['guid'], $data['scale']); $photo = Photo::selectFirst([], ['resource-id' => $data['guid'], 'scale' => $data['scale']]);
if (!empty($photo)) { if (!empty($photo)) {
$img_str = Photo::getImageDataForPhoto($photo); $img_str = Photo::getImageDataForPhoto($photo);
} }