a3rev / a3-lazy-load

Speed up your site and enhance frontend user's visual experience in PC's, Tablets and mobile with a3 Lazy Load.
GNU General Public License v3.0
18 stars 11 forks source link

Compatibility with EWWW alternative (JS) serving of WEBP images #7

Closed galbaras closed 6 years ago

galbaras commented 7 years ago

When the plugin is activated on site that has EWWW Image Optimizer configured to use JavaScript to serve WEBP images, the EWWW code stops working completely and all images are served in their original format.

I have already informed the EWWW plugin developer, so please collaborate on a solution for this.

The solution may be as simple as running the lazy loading script only after the EWWW image swapping has occurred if that plugin is active.

alextuan commented 6 years ago

@galbaras a3 lazy load plugin support some trigger for other plugin can call if want to run lazy load script after their script

this is list all triggers we support

load, orientationchange, resize, scroll, touchmove, focus, click, customlazyloadxtevent

For example they can call this if want lazy load script apply for image swapping

jQuery(document).trigger('customlazyloadxtevent');