• Resolved omar1000

    (@omar1000)


    Hello,

    for me the plugin works pretty good…
    as WP 5.5 is now supporting native lazyloading i do miss this feature in the plugin, would be nice to implement it (optional). I did write manually into line 1136 – 1142 in the imag tag… loading=’lazy’…
    now its working with lazyload, til the next update (-;

    Greetings!

    • This topic was modified 4 years, 1 month ago by omar1000.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Harry Milatz

    (@harry-milatz)

    Hi Omar,

    yes i will do so, there a lot of changes in the next version:)

    Could you show your code here?

    Best regards,
    Harry

    Thread Starter omar1000

    (@omar1000)

    Harry, these are the lines I did change:
    in each <img.. I did put in loading=’lazy’ …

    if(strpos($_SERVER['HTTP_USER_AGENT'],'rv:11.0')!==false) {
    				return "<img id='{$id}' alt='{$alt}' src='{$cachefile_png}' srcset='{$srcset} 2x' class='{$css}' height='{$size}' width='{$size}' loading='lazy' />";
    			}
    			elseif(strpos($_SERVER['HTTP_USER_AGENT'],'Validator.nu')!==true)  {
    				return "<img id='{$id}' alt='{$alt}' src='{$cachefile_png}' srcset='{$srcset} 2x' class='{$css}' height='{$size}' width='{$size}' loading='lazy' />";
    			}
    			else {
    				return "<img id='{$id}' alt='{$alt}' src='{$cachefile_png}' srcset='{$srcset} 2x' scale='1.5' originals='{$size}' src-orig='{$cachefile_png}' class='{$css}' height='{$size}' width='{$size}' loading='lazy' />";
    			}

    Salut,
    Omar

    • This reply was modified 4 years, 1 month ago by omar1000.
    Plugin Author Harry Milatz

    (@harry-milatz)

    Thanks:)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Lazyload missing’ is closed to new replies.