[closed] How To Pad Thumbnails Instead of Crop or Distort (6 posts)

  1. Peter Wooster
    Posted 4 years ago #

    I'm building an eCommerce site using eShop and need to have thumbnails that are all the same size. I would prefer them to be padded, not cropped or distorted.

    Does anyone know how to get the Media Library to pad thumbnails instead of cropping them or distorting them. I want thumbnails that include the whole picture without distortion. I know I can do it manually in Photoshop, but that is tedious.

    Is there a plugin that does this or a place I can hook into the thumbnail process to add the code?

    At present I'm using Javascript to pad the thumbnails to the right aspect ratio, but it sometimes causes very poor performance on the iPad.


  2. James Kirk
    Posted 4 years ago #

    Heya Peter,

    Given that you indicated you were using JavaScript to "pad" the thumbnails is it safe to assume that you're not referring to the same sort of padding that comes with the CSS "Padding" selector?

  3. Peter Wooster
    Posted 4 years ago #

    Thanks James,

    I'm not talking about css padding. The javascript uses width, height, and margin to achieve the desired result.

    I want the thumbnails to be a specific size, so that they can be displayed in a rectangular grid without using tables. The options on WordPress media library are to either stretch the image to fit or crop the image to fit. I want the whole image padded out to the desired size.

  4. jnhghy
    Posted 4 years ago #

    There are plugins that do this google for wordpress plugins resize thubmnail or thing like that(accordingly with what you want to achieve)

  5. Peter Wooster
    Posted 4 years ago #

    I don't want to just resize the thumbnail, and yes I know "Google is my friend"

    I want the thumbnail padded out to the desired size, e.g.. if the image is 400x400 and the thumbnail size is 300x200 I want the result to be 300x200, achieved by shrinking the image to 200x200 and then adding 50 pixels of padding on each side, like photoshop does when it displays a gallery.

  6. esmi
    Forum Moderator
    Posted 4 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic