EWWW lazyload not working on print (even with EWWW_IMAGE_OPTIMIZER_LAZY_PRINT)
-
Hi,
I have recently started using the EWWW Image Optimizer plugin on 2 major client websites. These are both major real estates websites with lots of high-quality pictures. Your plugin does a great job of compressing those images and adding lazy loading.
However, I noticed recently there is a problem when people try to print a page: the images are not loaded. I found online that I can use the
EWWW_IMAGE_OPTIMIZER_LAZY_PRINT
constant to prevent this, but it seems this only works when people click the print button a second time. The first time people print the page the images are not shown yet.As you can understand, this is a major problem.. Is there any fix for this?
I also found the following code so I can disable lazyload on the estate pages, but I would rather not as these are the image-heavy pages.
$url = $_SERVER['REQUEST_URI']; $endofurl = substr($url, -7); if ($endofurl == "/print/") { echo ".."; add_filter( 'eio_do_lazyload', '__return_false' ); $_GET['cornerstone'] = true; }
- The topic ‘EWWW lazyload not working on print (even with EWWW_IMAGE_OPTIMIZER_LAZY_PRINT)’ is closed to new replies.