Support » Plugin: MetaSlider » After Today’s Update – Images Blurry

  • Resolved areach

    (@areach)


    wordpress version: 5.2
    Wordpress theme: Twenty Seventeen

    Just updated MetaSlider plugin and now images on my homepage slideshow are blurry. Don’t know if anyone else has had the same issue. I don’t know how to fix this.

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

Viewing 13 replies - 1 through 13 (of 13 total)
  • An update to my first post. I forgot that I had changed the theme settings for the home page settings to display latest posts instead of a static home page. I set back to static home page and slide show images are no longer blurry. But I want to change back to having latest posts displayed on homepage. Anyone else have this problem with blurry images and posts displayed on homepage?

    Plugin Contributor kbatdorf

    (@kbat82)

    Hi @areach,

    This is an issue with JetPack. You can disable from changing images in MetaSlider by adding this to your functions.php file:

    add_filter('jetpack_photon_skip_image', 'metaslider_remove_jetpack', 10, 2);
    add_filter('jetpack_lazy_images_skip_image_with_attributes', 'metaslider_remove_jetpack', 10, 2);
    function metaslider_remove_jetpack($val, $src) {
    
    	// The lazy load filter send the src as a param
    	$src = isset($src['src']) ? $src['src'] : $src;
    
    	// Get an array of slideshow images
    	$slide_image_names = array_map(function ($post) {
    		$image = wp_get_attachment_url(get_post_thumbnail_id($post->ID));
    
    		// Extract the filename only from the slide image as WP will add sizes
    		return pathinfo(end(explode('/', $image)))['filename'];
    	}, get_posts(['post_type' => 'ml-slide', 'posts_per_page' => -1]));
    
    	// Filter through every slide image and see if Jetpack is trying to serve it
    	$skip = array_filter($slide_image_names, function ($slide_src) use ($src) {
    		return strpos($src, $slide_src) !== false;
    	});
    
    	return count($skip) ? true : $val;
    }

    Thank you kbatdorf!
    Could you tell me what folder that file would be in? Can I just add this to the end or does it have to go in a specific place in the file?

    Plugin Contributor kbatdorf

    (@kbat82)

    Hi @areach

    That’s a basic php file that is at the base folder of every theme. You can add it anywhere in that file.

    If you update the theme, however, you will lose it. So you will have to either add it as a mu-plugin, or create a “child theme” and add it to the functions.php file there. I’m not sure I can explain that process though but if you make progress and get stuck, I can try to assist.

    functions.php file: https://codex.wordpress.org/Functions_File_Explained
    mu-plugins: https://codex.wordpress.org/Must_Use_Plugins
    child themes: https://developer.wordpress.org/themes/advanced-topics/child-themes/

    Yes. I had godaddy help me transfer from a very old wordpress theme to this one and they created a child theme. My active theme is Twenty Seventeen Child.

    Thanks. It worked.

    Sorry, I spoke too soon. I put the code in the Twenty Seventeen Child functions.php. But I hadn’t yet set the home page settings for it to be my latest posts. When I did that they were blurry again.

    Plugin Contributor kbatdorf

    (@kbat82)

    Hi,

    Can you set it up so I can see the blurry image? Than I can check the html to see what’s happening.

    OK. Changed it. Now blurry. Thanks @kbat82!

    Plugin Contributor kbatdorf

    (@kbat82)

    What happens if you disable cropping under Advanced Settings?

    Checked it. Cropping is already disabled. Thanks

    I tried enabled cropping and now it’s not blurry.
    Not sure what enable cropping does. My header images look the same with enabled cropping as it did when it was disabled. Header images are 2,000px wide x 1,200px high.

    Really appreciate your all your help @kbat82. Thank you

    Plugin Contributor kbatdorf

    (@kbat82)

    Hi @areach

    Glad to hear it’s working now! Let me know if you have any more issues.

    By the way, if you’re enjoying MetaSlider please leave us a 5-star review. They really help us out and let others find our plugin more easily. If you don’t think we deserve the 5 stars please let us know how we can improve, too. Thanks!

    https://wordpress.org/support/plugin/ml-slider/reviews#new-post

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘After Today’s Update – Images Blurry’ is closed to new replies.