• Resolved jrichardsoncorre

    (@jrichardsoncorre)


    Tried from multiple browsers with a few users on different Windows 10 computers.
    Tried resetting cache/deleting cookies.

    On first load, images 2-7 in our slideshow at the top of the provided link show an extended, vertically stretched, image below the correct image. After cycling through each image once, the extended image no longer appears.

    After a refresh to the page, or a cache/delete cookies, the issue returns, and each image must be cycled through once more to appear correctly.

    Please advise!

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • It’s possible that this is caused by Jetpack plugin. Can you try adding the code below to your functions.php file and see if it fixes the issue.

    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;
    }

    If the issue still persists, please try deactivating all your plugins except for MetaSlider and see if it fixes the issue, then try to activate your plugins back one-by-one until you can find which is causing the conflict.

    Let us know how it goes.

    Thread Starter jrichardsoncorre

    (@jrichardsoncorre)

    Thank you, this worked!

    That’s good news. Glad we’re able to help.

    Feel free to open a new ticket in case you need anything else. We’ll be happy to assist you.

    Have a great day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Vertical Stretch on load’ is closed to new replies.