keithmancuso / craft-image-color Goto Github PK
View Code? Open in Web Editor NEWSimple Image Color filter for Craft CMS to extract colors from images.
Simple Image Color filter for Craft CMS to extract colors from images.
It seems that the plug-in prepends all image url with the site URL in the image_to_read
variable, thus making those that come from S3 invalid.
Changing
$image_to_read = $siteUrl . $image->url;
to
$image_to_read = $image->url;
in ImageColorService.php, works just fine with S3 assets.
First of all: Awesome plugin, thanks! Really adds a nice touch.
I noticed the following issue though:
getimagesize(/assets/images/image-example.jpg): failed to open stream: No such file or directory
This happens when the URL defined in the Asset Source doesn’t contain the baseUrl.
So this URL would work: http://xyz.com/assets/images/
But this wouldn’t: /assets/images/
So the fix is to add the baseUrl to the config and add it to the assets path like this: {baseUrl}assets/images/
.
But it would be cool if this wouldn’t be necessary, even with a Multi-Environment-Config.
I'm running Craft 2.6.291 (current latest) and I'm getting a few deprecation errors on installation:
Message
The “hook” prefix on the Craft\ImageColorPlugin::hookAddTwigExtension() method name has been deprecated. It should be renamed to addTwigExtension().
Origin
/var/sites/path/to/site/craft/app/services/PluginsService.php (586)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.