From 787703e8dc9e56676fe047a2718db514c440a2ec Mon Sep 17 00:00:00 2001 From: Matt Wilcox Date: Mon, 23 May 2016 11:12:44 +0100 Subject: [PATCH] Fix for Issue 4 https://github.com/familiar-studio/craft-image-color/issues/4 Failed to open stream: No such file or directory Uses the siteUrl which is already part of the config. --- imagecolor/services/ImageColorService.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/imagecolor/services/ImageColorService.php b/imagecolor/services/ImageColorService.php index ed29dd6..384d8b5 100644 --- a/imagecolor/services/ImageColorService.php +++ b/imagecolor/services/ImageColorService.php @@ -15,7 +15,8 @@ public function saveColors($image) $imageColor = new \ColorsOfImage( $image->url ); $colors = $imageColor->getProminentColors(); */ - $image_to_read = $image->url; + $siteUrl = craft()->config->get('siteUrl'); + $image_to_read = $siteUrl . $image->url; $pal = new \GetMostCommonColors(); $pal->image = $image_to_read; @@ -79,4 +80,4 @@ public function getColors($image) } -} \ No newline at end of file +}