• Resolved sninja

    (@sninja)


    Hi,

    I have been debugging you plugin yesterday as despite LazyLoading set in options it didn’t work. The problem was here:

    
    public function can_replace_url( $url ) {
    		if ( ! is_string( $url ) ) {
    			return false; // @codeCoverageIgnore
    		}
    		$url = parse_url( $url );
    
    		return isset( $this->possible_sources[ ltrim( $url['host'], 'www.' ) ] );
    	}
    

    and more precisely, $this->possible_sources for some reason contain the entries of my site img urls with ‘www’ sub-domain.

    Please have a look at it.

    Cheers,
    Kris.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @sninja,

    Yes, indeed this was an issue which I managed to fix it on the latest v2.0.2. Can you install it, clear the caching and let me know if this works better?

    Thanks !

    I’m using v2.0.2 and I’m getting “opportunity messages” from Google PageSpeed Insights that the images are not lazy loading.

    I’m also not entirely sure if this just means that I need to upload more properly sized pictures to begin with or if maybe your plugin is missing something here as well.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Lazy loading not always working’ is closed to new replies.