Support » Fixing WordPress » Best way to resize images

  • Hello,

    I hv a wordpress based wallpaper website where images can be downloaded for various screen as well as FB and twitter covers. If I upload an image and use auto image resizing, the images are screwed up. sometimes the face gets cut off and sometimes the important part of images get cut.

    So what is the best way for me to make the same image available in various resolution with minimal effort?

Viewing 5 replies - 1 through 5 (of 5 total)
  • J M


    Firstly you’ll want to check the Thumnail sizes set in Settings. Note that these Thumbnails are set to crop your images to the specified sizes, so this could be one reason for the problem you’re having.

    If your images are of different ratios, you won’t be able to use the default thumbnail settings. In this case, refer to add_image_size() paying particular attention to the last parameter (crop – boolean), where false means your images won’t be cropped. Once you’ve added some image sizes to your functions.php or site plugin, you’ll be able to call them in your template.

    If you have an already running site, after you sort out your image sizes, you may want to investigate the Regenerate Thumbnails plugin.

    I am using add_image_size() to resize the images at various resolution but it does not resize the image properly…

    For ex see the image in the link, how the resizer has cut the face.

    J M


    Can you show me the code you used? That might help to solve the issue.

    add_image_size(‘ImageEntryBig’, 580, 442, true);
    add_image_size(‘ImageEntrySmall’, 280, 191, true);
    add_image_size(‘ImageEntryTall’, 280, 442, true);
    add_image_size(‘ImageEntryWide’, 580, 191, true);

    If I make the last one false, it does not crop, but I get a more distorted image.

    So I have concluded that there is no automatic way of doing it.

    J M


    I’m not sure what you mean by distorted, but the true parameter means that your image will be cropped, so if the dimensions are off (the image ratios) things will look bad.

    The other thing to check is that you’re calling the thumbnails for these images correctly in your theme.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Best way to resize images’ is closed to new replies.