some images disappear

This topic contains 23 replies, has 4 voices, and was last updated by  Kiran 5 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #511764

    Alex Rollin
    Moderator
    Post count: 27815
    This reply has been marked as private.
    #511825

    Jan Smolorz
    Full Member
    Post count: 102
    This reply has been marked as private.
    #511934

    Kiran
    Moderator
    Post count: 7069

    Hi Jan,

    Issue has been fixed. There was conflict with Avada / Smush Pro. I have added following PHP snippet in child theme functions.php to fix this conflict.

    
    
    /**
     * Fix image srcset (Avada + Smush Pro).
     */
    function gd_snippet_191007_fix_image_srcset( $sources, $size_array, $image_src, $image_meta, $attachment_id ) {
    	if ( ! empty( $sources ) ) {
    		$_sources = array();
    
    		foreach ( $sources as $width => $source ) {
    			if ( is_array( $source ) && ! empty( $source['url'] ) ) {
    				$_sources[ $width ] = $source;
    			}
    		}
    
    		$sources = $_sources;
    	}
    
    	return $sources;
    }
    add_filter( 'wp_calculate_image_srcset', 'gd_snippet_191007_fix_image_srcset', 11, 5 );

    Please check and let us know.

    Regards,
    Kiran

    #511946

    Jan Smolorz
    Full Member
    Post count: 102

    that’s amazing
    thanks very much

    The smush was disabled and the issue was still there though

    #511948

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    #512079

    Jan Smolorz
    Full Member
    Post count: 102

    Hey
    now with the code you added I’m getting this

    http://prntscr.com/pgcd20

    Mind that when you added this code Smush pro was disabled

    #512090

    Kiran
    Moderator
    Post count: 7069

    Hi Jan,

    Snippet provided by me is working fine with Smush Pro plugin activated.

    Issue mentioned in http://prntscr.com/pgcd20 is coming from Smush Pro plugin. It is not related to my snippet. I checked without Smush Pro plugin and it worked.

    You can check now i have removed my snippet and now images are disappear again and issue you mentioned in http://prntscr.com/pgcd20 is still there.

    Regards,
    Kiran

    #512093

    Jan Smolorz
    Full Member
    Post count: 102

    That’s od
    I don’t think there was smush pro update and this issue didn’t exist earlier.
    Thanks for your help
    I’ll contact WPMU DEV about the problem
    Have a good day

    #512096

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
Viewing 9 posts - 16 through 24 (of 24 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount