Resizing Images in WordPress

This post is for others who generate WordPress blogs, especially with multiple images per post.

WordPress removed most of the functionality for image editing on March 27 2014 in the guise of an upgrade. There was a storm of protest on the WordPress forum and they eventually restored some of the lost functionality.

For me the worst downgrade was no longer being able to resize images by percentages and they have not restored that.  When you place images on a WordPress page they appear at page width. A landscape (horizontal) image with an aspect ratio of 3:1 therefore starts off nine times smaller than a portrait (vertical) image with the same aspect ratio. I used to use the percentage resize option to get all images on the page to be approximately the same area.

Losing this capacity got me thinking. I realised you could change image sizes by editing in text mode so I knocked up a utility in Excel to specify what the changes should be. Typing in those new values in text mode is probably quicker than percentage resizing was. And then I realised I could automate this using a Word macro, potentially useful for multiple-image posts.

.

Adult blue-tongued lizard

Adult blue-tongued lizard

Here are two images (cropped 1×1 and 16×9) that I resized in WordPress edit using the Word macro.  Actually, with only two images I might as well have done it manually using values from the Excel spreadsheet.

I usually use standard aspect ratios in Lightroom to resize images including a few custom ones I have defined for panoramic images (2:1, 2.5:1, 3:1). I started using standard aspect ratios so I could reuse mattes for prints in Canberra Photographic Society competitions.  I then found standard ratios more useful than custom ones for considering cropping and seldom need to specify custom ones for individual images.

I have included all these standard aspect ratios in the macro.  The macro will not change other ratios.  You can get the revised values for these from the spreadsheet and type them into the editing text or perhaps revise the macro.

.

Baby blue-tongued lizard

Baby blue-tongued lizard

The images show blue-tongued lizards sunning themselves in our garden yesterday, an adult and a young one. These are more specifically the eastern blue-tongued skink, Tiliqua scincoides scincoides. We also have the closely related shinglebacks in our garden.

Here is a link for an Excel spreadsheet which has both the utility to calculate image dimensions and the text of the macro to copy to Word.

  • Resizing WordPress Images
    • The spreadsheet includes the instructions for using both the utility and the macro.
    • You can use the macro to change all images to constant size provided you use captions (WordPress bug)
    • Otherwise, you can obtain values from the spreadsheet and use them in Edit Image/ Scale Image
      • including percentage resizing (further resizing cell)

I have also suggested WordPress incorporate an automatic capacity for resizing images and suggested how they would do this.  Whether they listen of course is another matter; so far they don’t appear to have paid any notice.

Postscript

There remain a number of bugs in the WordPress editing interface.  One is that sometimes when you use the interface to edit an image to change its size, the results are often not what you expect and it may balloon to full size. This may happen either when you resize the image through the edit image interface or when you change the image size in text mode. You can usually correct this in text mode by removing the tag “size-full” or “size-large” etc.

One recent change that I find useful is that you can now drag-and-drop images to the editing interface.  I usually post my images in chronological order and if I have them appropriately sorted in Windows Explorer they will usually be available to drop into the page in correct order.

One minor preference I have is that when I am dropping multiple images onto the page I do so in text mode.  This automatically creates spaces between the images; in visual mode they appear as though joined together.

 

13 thoughts on “Resizing Images in WordPress

    • I couldn’t believe it when it happened. It took me a while to realise it was a downgrade. I suspect it’s not so simple as a bit of code they’ve commented out. They really should roll it back but they’re clearly not going to. They say they’re working on it but I’d suggest putting in a help request and making it public for the Forum. The more people do that the more motivated they will be to fix it quickly.

      Like

    • I have just discovered that changing image sizes in text mode only works when you have a caption defined(!). (I always define captions, even “.” for quick border generation). The macro will only work if you have captions defined.

      So if you don’t use captions, that only leaves resizing through Edit Image/ Scale Image. In that case, you can still use the Excel utility to work out what to scale it to for constant areas.

      Like

  1. Pingback: Other « Murray Foote

  2. Dear Mr. Foote,

    Among your amazing photographs of India is a detail shot of a decorative relief–perhaps a cast iron pillar?–depicting a vine of pomegranates. The picture I’m referring to is labeled Anup Talao (at Fatehpur Sikri.)

    I’m writing because I wonder if you have other, more complete, shots of this architectural element.

    Thank you,

    Frances

    Like

    • Thanks very much Frances. I can’t tell you at the moment because I’m in Hawaii and away from my computer. I should remember to check when I get back on the 10th March, but perhaps remind me if I do forget.

      Like

Leave a comment