Support » Fixing WordPress » Adding an image size

  • pasqualerose

    (@pasqualerose)


    In Image Details>Display Settings for images size I’m given several options: Thumbnail, Medium, Large and Custom Size. I have a particular size I like to run a lot of my images. Is there a way I can add that to the image size options?

    Thanks!

    Pat

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Farhad

    (@farhadvn)

    You can to it by functions.php

    add_image_size( ‘nameofthumnailsize’, width, height, crop mode );

    For example:

    add_image_size( 'postthumbnail', 800, 240, true);
    add_image_size( 'post medium', 800, 240 );
    add_image_size( 'homepagethumbs', 220, 180 );
    add_image_size( 'sliderthumbnails', 590, 9999 );

    As you see, if add true it size will be forced, also names are optional based on your select

    add_image_size( 'jokesize', 100, 100);
    add_image_size( 'jokesize', 100, 100, ture); in case you want force crop (No preserving ratio)

    Note: names used in theme parts to know what size should be used. for exapmle:
    <?php the_post_thumbnail( 'jokesize' ); ?>

    pasqualerose

    (@pasqualerose)

    Ok. Thank you!

    I appreciate the information.

    Pat

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