Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #604755

    Hello,
    I’m having trouble with modifying the image size array.
    I want to remove and add via a child themes’ functions.php image sizes.

    I’ve tried to use the method presented here: https://kriesi.at/support/topic/generate-new-image-sizes-in-child-theme/#post-129951 – which was referenced in other threads but it seems it doesn’t work.

    This is the code that is added inside my child themes functions.php

    function avia_change_image_size_array() {
    	global $avia_config;
    	$avia_config['imgSize']['square'] 		 	    = array('width'=>180, 'height'=>180);		                 // small image for blogs
    	$avia_config['imgSize']['featured_large'] 		= array('width'=>1500, 'height'=>630 );						// images for fullsize pages and fullsize slider
    	$avia_config['imgSize']['extra_large'] 		 	= array('width'=>1500, 'height'=>1500 , 'crop' => false);	// images for fullscrren slider
    	$avia_config['imgSize']['gallery'] 		 		= array('width'=>845, 'height'=>684 );						// images for portfolio entries (2,3 column)
    	$avia_config['imgSize']['entry_with_sidebar'] 	= array('width'=>845, 'height'=>321);		            	// big images for blog and page entries
    	$avia_config['imgSize'] = apply_filters('avf_modify_thumb_size', $avia_config['imgSize']);
    }
    
    add_action( 'init', 'avia_change_image_size_array');

    I’m testing this on a local server via MAMP, using Enfold 3.5 with a child theme, and I’ve used Regenerate Thumbnails plugin: https://wordpress.org/plugins/regenerate-thumbnails/

    Am I missing something?

    #604839

    Hey fmiron!

    Please use following code instead

    add_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 );
    function enfold_customization_modify_thumb_size( $size ) {
    $size['entry_with_sidebar'] = array('width'=>300, 'height'=>300);
    return $size;
    }

    Best regards,
    Yigit

    #929431

    Hello I am having similar issues. I would like the slider to be fixed height and show images at non restricted width, at the moment they are all different heights but same width and it looks terrible. Also the product list set up does not show any products???

    #930261

    Hi kylienorton,

    Here is what can be done with css:

    
    #top .thumbnail_container img {
      max-height: 160px;
        width: auto;
        min-height: 160px;
        height: 160px;
    }
    

    It is not perfect. The thing is, any slider with images of different aspect ratios will be jumping. The thumbs have to be either scaled up or cropped, anyway, this easier to do when preparing images, not in the code.

    Best regards,
    Victoria

    #930306

    Hi Victoria
    Thanks, but that doesn’t really work. See link in private content section re below.
    See how the images are set height but whatever width.
    When I apply your fix, it does not reflect the smaller widths, just sets the box to equal width, leaving the image smaller if portrait.
    .shop_columns_5 .products .product – if I change the width % here to auto; it works for the images showing their original proportions, but wraps to the next line, ie. still set to show set number of images – 5. ie. fixes one, but not the other

    Thanks for trying.
    K

    #931045

    Hi,

    Could you provide a screenshot of the issue? This is how I see the slider on my end after the css modification.

    // https://imgur.com/a/Wihxe

    Best regards,
    Ismael

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.