• Resolved Belal Khan

    (@belalkhan2292)


    =====Face to Resize MY Post Thumbnail image ============

    I want to resize my image and i also want when i will upload any size image that’s why it will be resize by my given size . can i do it ?
    my image size width= “1500px” height=”600px” but i want to it will be resize 1000px width and 400px height .

    it will not be cropping

    Need Help expect from WordPress Expert . please help me .

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator t-p

    (@t-p)

    – By default WordPress has three four different image sizes: full, large, medium, thumbnail. Thus, by default when upload any image by using media uploader in WordPress it create three different size like thumbnail(default 150px x 150px max), medium(default 300px x 300px max), large(default 640px x 640px max) and full is original image size.
    – if you want to access custom size then add the following code in your function.php, for example:

    add_action( 'after_setup_theme', 'theme_setup' );
    function theme_setup() {
       // Be sure your theme supports post-thumbnails
       add_theme_support( 'post-thumbnails' );
       // the params are 'name of the custom size', width (px), height (px) and crop (false/true).
        add_image_size('my-image-size', 1000, 400, true);

    }

    – and then call featured image in your template like, for e xample:

    the_post_thumbnail('my-image-size');

    Hi belalkhan2292, If you do not want to use WordPress’s crop functionality, then why are you seeking any method to resize image? If you want to show an image in exact size without cropping then just fix the image’s height and width in css. Then your image will be shown directly on your front end.

    Thread Starter Belal Khan

    (@belalkhan2292)

    arefin2k

    Hi Yes You are Correct . Thanks for your Comment .

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fetaured image’ is closed to new replies.