• Resolved tomot

    (@tomot)


    Hi again, i was misunderstood previous post.
    Gridder template is forcing crop mode instead of using eg. “Resize proportionally to fit entire image into the specified dimensions and add margins if required.” which is set in settings.
    Is it intended ?

    I did small change in card.php code:

                        $entry->getImage(
    		       array(
    			'image'    => $atts['image'],
    i just removed 	      //'height'   => $atts['image_height'],
    those two lines	      //'width'    => $atts['image_width'],
    

    And now resizing works as it is set in settings, but obviously this is not a way to do it. I guess there is a better solution?

    • This topic was modified 2 years, 1 month ago by tomot.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Steven

    (@shazahm1hotmailcom)

    Since Gridder is designed to display portrait images, the crop mode defaults to the scale and crop; center weighted.

    To change the default, install the Code Snippets plugin. After it is installed and activated, add a new snippet with the following code:

    add_filter( 
    	'cn_output_default_atts_image', 
    	static function( $atts ) {
    
    		$atts['zc'] = 2;
    
    		return $atts;
    	}
    );

    I hope this helps; please let me know.

    Thread Starter tomot

    (@tomot)

    Yes, works perfectly. Thank you for help!

    Plugin Author Steven

    (@shazahm1hotmailcom)

    Great to hear. Happy to help. Have a great weekend!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Gridder is forcing crop mode’ is closed to new replies.