Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: option to use background-color as placeholder (instead of an image) #333

Closed
rejhgadellaa opened this issue May 7, 2016 · 2 comments

Comments

@rejhgadellaa
Copy link

So we can make the placeholder a bit nicer just with some css or maybe js for random colors.

...or is this possible? Couldn't find it via google :)

@rejhgadellaa
Copy link
Author

Hmm okay maybe this is a 'nevermind' thing. I just used

$(".lazy").lazyload({placeholder:"transparent.png"})

and that does the trick because it then shows the css background-color :)

Still.. would be useful because this does take a (very little) extra data bandwidth (in my case a 24x24 png so not much but still) and setting it up. It would be cleaner to just use hex or rgb(a) colors

@Rct567
Copy link

Rct567 commented Jul 9, 2016

you can use this (transparent gif):

placeholder:"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="

@tuupola tuupola closed this as completed Aug 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants