From f681f1c60b11b873bb904ea1167f73fc7f6b288c Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Fri, 27 Apr 2018 16:18:16 -0600 Subject: [PATCH] resolve streams earlier --- system/src/Grav/Common/Page/Medium/Medium.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/src/Grav/Common/Page/Medium/Medium.php b/system/src/Grav/Common/Page/Medium/Medium.php index 1dd60d411..4ff50f384 100644 --- a/system/src/Grav/Common/Page/Medium/Medium.php +++ b/system/src/Grav/Common/Page/Medium/Medium.php @@ -196,6 +196,11 @@ public function url($reset = true) { $output = preg_replace('|^' . preg_quote(GRAV_ROOT, '|') . '|', '', $this->get('filepath')); + $locator = Grav::instance()['locator']; + if ($locator->isStream($output)) { + $output = $locator->findResource($output, false); + } + if ($reset) { $this->reset(); }