This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

TB images sizes

  • Creator
    Topic
  • #1861
    mharpen
    Participant

    Hi J. 2 small things I found relating to image sizes:
    1) The default slider image sizes for height are off by 1 pixel. If you look at your example at: http://demo.themeblvd.com/?theme=alyeska and look closely while changing between the large and staged slides, you’ll see the height of the slider box shift by 1 pix, and the content below shift also. What I did, was changed the slider-staged height to 313 instead of 312, and now there is no shift. You may want to change the default in the theme.

    2) your TB Image Sizes plugin documentation says that rather than use the plugin, you can just put the following code into your functions.php:

    function my_image_sizes( $sizes ) {
        $sizes['slider-large'] = array(
            'width' => '960', // Your new width
            'height' => '350' // Your new height
        );
        return $sizes;
    }
    add_filter( 'themeblvd_image_sizes', 'my_image_sizes' );

    However, this code “recreates” the array and therefore drops the ‘crop’ type array element, which I believe made it fall back to false instead of true. So if crop type is in all your themes, you might want to change the sample code at: http://wordpress.org/extend/plugins/theme-blvd-image-sizes/ to:

    function my_image_sizes( $sizes ) {
    	$sizes['slider-large']['width'] = 960;
    	$sizes['slider-large']['height'] = 350;
    
    	$sizes['slider-staged']['width'] = 530;
    	$sizes['slider-staged']['height'] = 313;	// theme default is 312, which is off by 1 px
    
    	return $sizes;
    }
    add_filter( 'themeblvd_image_sizes', 'my_image_sizes' );
Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #1865
    mharpen
    Participant

    Small correction to the above. In Alyeska, the maximum width of the slider is 940px. So it’s better to use the following so the browser doesn’t have to resize the large image.:

    function my_image_sizes( $sizes ) {
    	$sizes['slider-large']['width'] = 940;
    	$sizes['slider-large']['height'] = 350;
    
    	$sizes['slider-staged']['width'] = 530;
    	$sizes['slider-staged']['height'] = 313;	// theme default is 312, which is off by 1 px
    
    	return $sizes;
    }
    add_filter( 'themeblvd_image_sizes', 'my_image_sizes' );
Viewing 1 replies (of 1 total)
  • The forum ‘Alyeska Responsive WordPress Theme’ is closed to new topics and replies.