kennethcachia / background-check

Automatically switch to a darker or a lighter version of an element depending on the brightness of images behind it.
http://kennethcachia.com/background-check/
MIT License
3.27k stars 282 forks source link

Cross origin demo not working #110

Open ghost opened 6 years ago

ghost commented 6 years ago

Hi I noticed the cross origin demo wasn’t working on your site. This is is exactly what I need to get the slider to work for a shopify theme I’m working on and would love to use this plugin for it

http://www.kennethcachia.com/background-check/cross-origin-css.html

npiasecki commented 5 years ago

FWIW, in my Shopify theme, I got it working by adding crossOrigin="anonymous" in the HTML where I server up the image:

<img class="check-solid" src="{{ 'img_temp_hero_alt.jpg' | asset_url }}" style="width: 100%;" crossOrigin="anonymous" />