- $image['url'] = self::completeUrl($image['url'], $page_url);
- $photodata = Images::getInfoFromURLCached($image['url']);
- if (!empty($photodata) && ($photodata[0] > 50) && ($photodata[1] > 50)) {
- $image['src'] = $image['url'];
- $image['width'] = $photodata[0];
- $image['height'] = $photodata[1];
- $image['contenttype'] = $photodata['mime'];
- unset($image['url']);
- ksort($image);
- } else {
- $image = [];
+ if (!empty($image['url'])) {
+ $image['url'] = self::completeUrl($image['url'], $page_url);
+ $photodata = Images::getInfoFromURLCached($image['url']);
+ if (!empty($photodata) && ($photodata[0] > 50) && ($photodata[1] > 50)) {
+ $image['src'] = $image['url'];
+ $image['width'] = $photodata[0];
+ $image['height'] = $photodata[1];
+ $image['contenttype'] = $photodata['mime'];
+ unset($image['url']);
+ ksort($image);
+ }