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

Lazy loading images without placeholder shows brief broken image icon and alt text #60

Closed
janvitos opened this issue Jul 8, 2018 · 5 comments

Comments

@janvitos
Copy link

janvitos commented Jul 8, 2018

Hi,

Since version 1.4.8, the new lazy loading method without a placeholder shows a brief broken image icon and the alt text.

See screenshot here: https://imgur.com/a/6QjWJZ1

I'm not sure if this was intended or not, but it's not too pretty.

@lkraav
Copy link

lkraav commented Jul 8, 2018

Since version 1.4.8, the new lazy loading method without a placeholder shows a brief broken image icon and the alt text.

Have you been able to identify what the DOM markup is like at that "broken" moment?

@gerdneuman
Copy link

@janvitos I guess this means that the img does not get loaded successfully. (with loaded I mean lazyloaded). I guess you should look into the Network tab of the devtools to see if there's an error. https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor

@xianx
Copy link

xianx commented Aug 16, 2018

In new version as image place holder is removed image are not showing and showing src unknown see the screenshots https://techtun.es/hubsQ9 and as a result images are are showing broken https://techtun.es/Ead86Q

Now how to fix them.

@janvitos
Copy link
Author

janvitos commented Jan 4, 2019

You can fix this problem by adding this line to your CSS file:

img[src=""] { visibility: hidden; }

This will hide all missing images and prevent the broken image thumbnail from showing.

@smarteist
Copy link

smarteist commented Nov 22, 2020

You can fix this problem by adding this line to your CSS file:

img[src=""] { visibility: hidden; }

This will hide all missing images and prevent the broken image thumbnail from showing.

In addtion to @janvitos answer we can add:

//lazyload images

img[src=""],
img:not([src]) {
  visibility: hidden;
}

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

5 participants