diff --git a/mod/photos.php b/mod/photos.php
index 5fb6ba368..16af45599 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -1633,7 +1633,7 @@ function photos_content(App $a)
'$paginate' => $paginate,
]);
- $a->page['htmlhead'] .= "\n" . '' . "\n";
+ $a->page['htmlhead'] .= "\n" . '' . "\n";
$a->page['htmlhead'] .= '' . "\n";
$a->page['htmlhead'] .= '' . "\n";
$a->page['htmlhead'] .= '' . "\n";
diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php
index 55fc24273..3054170fc 100644
--- a/src/Content/Text/BBCode.php
+++ b/src/Content/Text/BBCode.php
@@ -578,7 +578,10 @@ class BBCode extends BaseObject
$return .= sprintf('
', $data["url"], self::proxyUrl($data["preview"], $simplehtml), $data["title"]);
}
- if (!empty($data['title']) && !empty($data['url'])) {
+ // Show a picture only when the BBCode is meant for posts to connector networks
+ if (($simplehtml != 0) && ($data["type"] == "photo") && !empty($data["url"]) && !empty($data["image"])) {
+ $return .= sprintf('', $data["url"], self::proxyUrl($data["image"], $simplehtml), $data["title"]);
+ } elseif (!empty($data['title']) && !empty($data['url'])) {
$return .= sprintf('