From f617eb0ed96287df7e19a34446bd5cc6fe74c173 Mon Sep 17 00:00:00 2001 From: "zach.bimson" Date: Thu, 8 Dec 2016 15:44:02 +0300 Subject: [PATCH] Issue #2833960 by zach.bimson: image_style() should return relative path --- src/TwigExtension.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/TwigExtension.php b/src/TwigExtension.php index 14fed21..1f9fb7e 100644 --- a/src/TwigExtension.php +++ b/src/TwigExtension.php @@ -253,7 +253,8 @@ class TwigExtension extends \Twig_Extension { * in an tag. Requesting the URL will cause the image to be created. */ public function imageStyle($path, $style) { - return ImageStyle::load($style)->buildUrl($path); + $url = ImageStyle::load($style)->buildUrl($path); + return file_url_transform_relative($url); } }