diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 5a2b966dd..7319aeee8 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -327,8 +327,13 @@ class BBCode } } } elseif (count($pictures) > 0) { - $post['type'] = 'link'; - $post['url'] = $plink; + if (count($pictures) > 4) { + $post['type'] = 'link'; + $post['url'] = $plink; + } else { + $post['type'] = 'photo'; + } + $post['image'] = $pictures[0][2]; $post['text'] = $body;