]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/Images.php
Display the publish time in the local timezone
[friendica.git] / src / Util / Images.php
index 3b07aee2fca1399e35bc6a994ed3459d70b2ce46..bf84ee6c22552bad74d3db1eb83272a5bc52f0d3 100644 (file)
@@ -185,10 +185,11 @@ class Images
                }
 
                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)) {
                                $img_str = Photo::getImageDataForPhoto($photo);
                        }
+                       // @todo Possibly add a check for locally stored files
                }
 
                if (empty($img_str)) {