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

Prevent the large image preloading #38

Open
Tammeny opened this issue Feb 2, 2018 · 7 comments
Open

Prevent the large image preloading #38

Tammeny opened this issue Feb 2, 2018 · 7 comments
Labels

Comments

@Tammeny
Copy link

Tammeny commented Feb 2, 2018

First of all,this plugin is very awesome,thank you so mach. But there are some shortcoming. For example, the origin images in the <a href="./assets/large-rakuda.jpg"></a> will be loaded at the same time.
So, how to prevent the origin image preloading?

image

@ishii-jun
Copy link

Was looking for that too!

@steelydylan
Copy link
Contributor

Hi @Tammeny @ishii-jun
Unfortunately, There is no way to prevent the origin image preloading as of now.
I'll add that feature later

@steelydylan
Copy link
Contributor

Hi @Tammeny @ishii-jun
I added the feature to prevent preloading by default thank you :)

@Rad-Chertovsky
Copy link

Thank you for your work! I have a problem using your plugin with lazy loading of images, which initially refer to the preloader in the "src" attribute, and only after appearing in the visible area receive the real link from "data-src". Could you give any advise how to solve this problem? I'm not a profy in js))

@steelydylan
Copy link
Contributor

Hi @Rad-Chertovsky I just added data-lazy attribute for img tags from v1.5.0 plz try ;)

@Rad-Chertovsky
Copy link

Rad-Chertovsky commented Oct 10, 2019

Now it doesn't work at all(( Even in your examples folder works only vanilla.html
With old smartphoto.js it's all good except wrong prewiev images in smartphoto-nav bar
my pattern is like this:
<a class="js-smartphoto" href="../images/Big-photo1.jpg" data-caption="caption" data-id="some-photo" data-group="some-group"> <img class="lazy" src="../images/placeholder.jpg" data-src="../images/photo1.jpg" data-lazy="../images/photo1.jpg">

@uidev1116
Copy link
Contributor

uidev1116 commented Jan 11, 2023

@Rad-Chertovsky
Is this issue still occurring? if it was resolved, Can I close this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants