SmartPhoto icon indicating copy to clipboard operation
SmartPhoto copied to clipboard

Prevent the large image preloading

Open Tammeny opened this issue 7 years ago • 7 comments

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

Tammeny avatar Feb 02 '18 08:02 Tammeny

Was looking for that too!

ishii-jun avatar Feb 13 '18 10:02 ishii-jun

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 avatar Feb 22 '18 09:02 steelydylan

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

steelydylan avatar Sep 13 '19 10:09 steelydylan

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))

Rad-Chertovsky avatar Oct 08 '19 13:10 Rad-Chertovsky

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

steelydylan avatar Oct 10 '19 02:10 steelydylan

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">

Rad-Chertovsky avatar Oct 10 '19 07:10 Rad-Chertovsky

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

uidev1116 avatar Jan 11 '23 06:01 uidev1116