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

Protocol-less images doesn't fade in #8

Open
rexxars opened this issue Jul 9, 2016 · 2 comments
Open

Protocol-less images doesn't fade in #8

rexxars opened this issue Jul 9, 2016 · 2 comments

Comments

@rexxars
Copy link

rexxars commented Jul 9, 2016

I'm not quite sure what the intention was with the first part of this line:

if(!src.match(/http/) || typeof window === 'undefined') opacity = 1

Basically that means you won't get fading images for:

  • Relative URLs (<LegitImage src="foo.jpg" />)
  • Protocol-less URLs (<LegitImage src="//domain.com/foo.jpg" />)
@agunescu
Copy link

agunescu commented Dec 8, 2016

I am not quite sure what's the intention on the second part, why checking for window undefined?
Also I don't see the lazy load part, where are you using data-src?

@zackify
Copy link
Member

zackify commented Jan 20, 2017

We check for window undefined in case of a server render. Sorry, somehow I missed these emails.

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