Skip to content

Commit

Permalink
fix: allow images to start with http/https
Browse files Browse the repository at this point in the history
  • Loading branch information
timkley committed Nov 2, 2024
1 parent e3151f1 commit 6b9a979
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Extensions/MarkdownImageExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function onDocumentParsed(DocumentParsedEvent $event): void
}

// if this isn't an external image, set the prefix
if (! Str::startsWith($node->getUrl(), 'http')) {
if (! Str::startsWith($node->getUrl(), ['http://', 'https://'])) {
$originalUrl = $node->getUrl();
$node->setUrl(route('prezet.image', $originalUrl, false));

Expand Down

0 comments on commit 6b9a979

Please sign in to comment.