diff --git a/app/Classes/AttachmentsManager.php b/app/Classes/AttachmentsManager.php index 3142f88..eb49409 100644 --- a/app/Classes/AttachmentsManager.php +++ b/app/Classes/AttachmentsManager.php @@ -158,7 +158,7 @@ public function replaceAttachmentsInMarkdown(string $markdown) foreach ($matches[1] as $index => $ref) { try { - $component = $this->getComponentByRef($ref, 'article'); + $component = $this->getComponentByRef($ref); } catch (Exception $ex) { continue; } @@ -188,6 +188,8 @@ public function getComponentByRef(string $ref, ?string $filter = null) if (!empty($filter)) { $variant['filename'] = $this->getVariantFullPath($ref, $filter); + } else { + $variant = $attachment; } $component = $this->getBladeComponent($attachment, $variant);