diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index 5738c01d8a..f137bd2349 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -1107,7 +1107,7 @@ class Feed XML::addElement($doc, $entry, "id", $item["uri"]); XML::addElement($doc, $entry, "title", html_entity_decode($title, ENT_QUOTES, 'UTF-8')); - $body = OStatus::formatPicturePost($item['body']); + $body = OStatus::formatPicturePost($item['body'], $item['uri-id']); $body = BBCode::convert($body, false, BBCode::OSTATUS); diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index 1019d34cc7..869213ade2 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -1195,7 +1195,7 @@ class OStatus * @return string The cleaned body * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ - public static function formatPicturePost($body) + public static function formatPicturePost($body, $uriid) { $siteinfo = BBCode::getAttachedData($body); @@ -1207,7 +1207,7 @@ class OStatus } // Is it a remote picture? Then make a smaller preview here - $preview = ProxyUtils::proxifyUrl($preview, ProxyUtils::SIZE_SMALL); + $preview = Post\Link::getByLink($uriid, $preview, ProxyUtils::SIZE_SMALL); // Is it a local picture? Then make it smaller here $preview = str_replace(["-0.jpg", "-0.png"], ["-2.jpg", "-2.png"], $preview); @@ -1886,7 +1886,7 @@ class OStatus XML::addElement($doc, $entry, "title", html_entity_decode($title, ENT_QUOTES, 'UTF-8')); $body = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']); - $body = self::formatPicturePost($body); + $body = self::formatPicturePost($body, $item['uri-id']); if (!empty($item['title'])) { $body = "[b]".$item['title']."[/b]\n\n".$body;