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 load images are missing for print page for all browsers #276

Open
YHartonuk opened this issue Oct 27, 2021 · 1 comment
Open

Lazy load images are missing for print page for all browsers #276

YHartonuk opened this issue Oct 27, 2021 · 1 comment

Comments

@YHartonuk
Copy link

YHartonuk commented Oct 27, 2021

Lazy load images are missing for print page for all browsers

@YHartonuk YHartonuk changed the title Lazy load images is missing for print page for all browsers Lazy load images are missing for print page for all browsers Oct 27, 2021
@fintinc
Copy link

fintinc commented Jan 31, 2023

You can add the "window.onbeforeprint" function:

// Handle Lazy loading on page print
window.onbeforeprint = function() {
   $('.lozad').each(function() {
       var src = $(this).attr('data-src');
       $(this).attr('src', src).parent().addClass('loaded');
    });
};

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

2 participants