Lorti / dominant-colors-lazy-loading-wordpress-plugin

This plugin allows you to lazy load your images while showing the dominant color of each image as a placeholder – like Pinterest or Google Images.
https://wordpress.org/plugins/dominant-colors-lazy-loading/
GNU General Public License v2.0
95 stars 10 forks source link

Dominate color remains in trasparent portion of rendered PNG #18

Closed ManderZander closed 8 years ago

ManderZander commented 8 years ago

Dominant Colors Lazy Loading Version 0.6.0 WordPress Version 4.6.1

The source PNG has about 50% transparency: http://sparkacting.com/wp-content/uploads/2016/09/2016-clockwork-alchemy-logo-214x237.png

The Dominant Colors Lazy rendered image still shows the dominant color: http://sparkacting.com/wp-content/uploads/2016/09/Dominant-Colors-Lazy-Loading-Bug-report-2016-09-30-crop.png

Source html from WordPress post: <img class="alignright size-full wp-image-207" src="http://sparkacting.com/wp-content/uploads/2016/09/2016-clockwork-alchemy-logo-214x237.png" alt="2016-clockwork-alchemy-logo-214x237" width="214" height="237" />

Html the browser is rendering (note the added style="background: #622016;" ): <img class="alignleft size-full wp-image-207 dcll-image" src="http://sparkacting.com/wp-content/uploads/2016/09/2016-clockwork-alchemy-logo-214x237.png" style="background: #622016;" alt="2016-clockwork-alchemy-logo-214x237" width="214" height="237" data-pagespeed-url-hash="267363157" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">

ManderZander commented 8 years ago

I only encountered this issue when is configured to Dominant Colors Lazy Loading us the "SVG" format. As a work around I've switch Dominant Colors Lazy Loading to use GIF.

Lorti commented 8 years ago

Hello @ManderZander, version 0.6.1 should fix your issue! 🙂

ManderZander commented 8 years ago

Verified: the bug is gone. Thanks :-)