• Resolved misaka1

    (@misaka1)


    Hello,

    Colormag (my theme) is having some issues with Smush when it comes to mobile devices. The first element (slider) loads properly and then there is a gap and as i scroll or wait, the content below slides up to the previous gap and fills it in. It’s an annoying bug tbh but there is no fix up to this date from colormag’s devs.
    I realize that this is a colormag’s problem but they don’t seem to be working on this issue. Is there a way to disable lazyload on mobile devices? Or are you going to integrate such function in the future? It would be very helpful.

    Smush’s lazyload is the only lazy load that is working on PCs properly (before the lazy load was putting a huge gap between the slider and featured posts and the content below so thank you for providing me with the best plugin I could find for the fast load on the pc :).

    Thank you for your answer!

    • This topic was modified 5 years, 3 months ago by misaka1.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @misaka1,

    Could you please try to add .attachment-colormag-featured-image to the Classes & IDs exclusion list in Smush – Lazy Load module?

    Best regards,
    Anton

    Thread Starter misaka1

    (@misaka1)

    Hey @vanyukov,

    Thank you for your quick reply. I have tried this just now. Whilst this is working for the phone because the gap disappears this way, the pc slider is bugging on the pc. This is caused by some error with colormag again (they have problems fixing the slider.. if I load the page without the lazy load on the slider or without a preloader plugin, the slider basically flashes the second picture of the slider under it and then composes itself back to normal).

    This is why I am looking into an option where it would be disabled only for mobile users.

    • This reply was modified 5 years, 3 months ago by misaka1.

    @misaka1,

    Please try adding this to your theme functions.php file:

    add_filter( 'smush_skip_image_from_lazy_load', function( $skip, $src, $image ) {
    	if ( ! wp_is_mobile() ) {
    		return $skip;
    	}
    
    	return false !== strpos( $image, 'attachment-colormag-featured-image' );
    }, 10, 3 );

    Best regards,
    Anton

    Thread Starter misaka1

    (@misaka1)

    @vanyukov seems to be working, thank you very much for your help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Is there any way to make lazy load from Smush disabled on mobile?’ is closed to new replies.