[Plugin: jQuery Image Lazy Load WP] Having trouble with images not loading? I found a solution!
-
After much hair-pulling and begging for help from my hardcore developer friends, I finally found a way to fix the problem with some images just failing to load at all when this plugin is active.
Basically, the way I did it was to force the plugin to ignore images of a certain class. To do this, you need to make the jquery_lazy_load_ready function (located in the plugin’s .php file) look like this:
function jquery_lazy_load_ready() { $placeholdergif = plugins_url('images/grey.gif', __FILE__); echo <<<EOF <script type="text/javascript"> jQuery(document).ready(function($){ if (navigator.platform == "iPad") return; jQuery("img").not(".cycle img, .pariah").lazyload({ effect:"fadeIn", placeholder: "$placeholdergif" }); });
The key component is this line: jQuery(“img”).not(“.cycle img, .pariah”).lazyload({
See where is says .not(“.cycle img, .pariah)? So all you have to do it add class=”pariah” to the img tag of any image you want to exclude.
Hope this helps someone just as frustrated as I was ??
https://www.ads-software.com/extend/plugins/jquery-image-lazy-loading/
- The topic ‘[Plugin: jQuery Image Lazy Load WP] Having trouble with images not loading? I found a solution!’ is closed to new replies.