Home Forums Add-ons Gallery Field Gallery medium-large dimensions


Gallery medium-large dimensions

  • Hi,
    Before I purchase I just want to know how do you specify the [medium-width/height] and [large-width/height] of images?

  • 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.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Gallery medium-large dimensions’ is closed to new replies.