Support » Plugin: Pinterest Pinboard Widget » Crop images when not square

Viewing 4 replies - 1 through 4 (of 4 total)
  • Cropping the images by CSS won’t work, because we don’t want to crop all images. We want to crop the ones with a weird aspect ratio and unfortunately CSS does not have this information.

    I modified the php file to discard any image with a weird aspect ratio and just keep looping until my desired number of pins is found. I tested this in my computer’s localhost and it worked, all the images displayed are nearly square. I haven’t deployed this in my real website though because I think this is a slow solution.

    I’m hoping somebody else comes up with a better solution.


    I manage a customize WordPress blog at

    The site is designed with a feature post at the top and seven posts arrayed below. When we post an article we always insert a 3:2 aspect ratio image and designate as the feature image (300 px wide and 200 px high).

    The site is custom programmed to display those 3:2 images as square image in the lower categories (the seven categories displayed on the lower part of the page).

    This has worked with exception for several years — but no longer. If you visit the site, you will notice that article posted under the category World Mission entitled “New Testament Partnership” retains the 3:2 aspect ratio and is not converted to a square as all the others.

    The conversion to square image has always work until recently. In fact, it seem to have work until WordPress recently change the process of inserting image. That being said, it does not fail to work consistently.

    My questions:

    1) Why do these images (the one in the World Mission category and the one in the Solo Scriptura category) not auto square as before?

    2) Is this ultimately a WordPress issue, a picture formatting issue, or a programming issue.

    Thank you for your help.


    Correction on previous post:

    “This has worked with exception for several years” should read “without exception.”

    Walt Walker

    Hi Walter,

    I’m not sure what your issue is. My best guess is that it is an issue with your code. I would check the PHP section of the code where you get the featured images. I would start by looking in your code for:

    <article class=”secondary-article”>

    and see what’s going on there.

    This question, however, actually is not related to the Pinterest plugin. I am no longer using the plugin either, so I am going to close this thread.

    Good luck!


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Crop images when not square’ is closed to new replies.