Home Forums Add-ons Gallery Field Gallery medium-large dimensions Reply To: Gallery medium-large dimensions

  • You can specify the dimension of any thumbnails by adding a filter to your function.php:

    if ( !function_exists('theme_setup') ) :
      function theme_setup() {
        // Add post thumbnails (
        add_image_size( 'one-thumb-slider', 1170, 430, true );
        add_image_size( 'two-thumb-full', 900, 500, true );
        add_filter( 'image_size_names_choose', 'custom_image_sizes' );
    add_action('after_setup_theme', 'theme_setup');

    Then in your loop:

    <img src="<?php echo $image['sizes']['two-thumb-full']; ?>" alt="<?php echo $image['alt']; ?>" />

    Note: Remember to add the filter before uploading any images otherwise you need to reset all the thumbs via a plugin or delete and re-upload all the images.