• I’ve decided to change the aspect radio of my WooCommerce product images from 1:1 to another ratio (maybe 2:3 or 3:4).

    If I replace the original images in /wp-content/uploads the meta for the images in the media library still have the same image resolution in pixels which renders the image incorrectly when just changing the images on disk.

    I don’t want to use a plugin like Media replace and replace 1800 images one by one. How can I do this in bulk?

    Thanks for any help!

    • This topic was modified 5 years, 1 month ago by Ben Andersen.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey @ben72,

    You can change the size of the images on your site. To do that go to the Appearance section of your dashboard and click on Customize. Select the WooCommerce section and then Product Images.

    You can either change the aspect ratio of the images here or set the size of the images. The options will depend on the theme and what it supports.

    Once the sizes are changed, it should trigger the regenerate thumbnails action and resize all of your images.

    If you run into trouble, please let us know.

    Cheers

    Thread Starter Ben Andersen

    (@ben72)

    Hi @3sonsdevelopment!

    Thank you for your suggestion. But what I want to do is replace the original images with a new image size. Not just the thumbs. On the product page the images are displayed in the original aspect ratio as they were uploaded in.

    But what I found is that the wp-cli command “wp media regenerate” seems to regenerate the image resolution in the image meta.
    So I just have to replace the images and then run that command it seems from my testing. I will do some more testing before I jump into it and change all 1800 images! ??

    Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to change original images?’ is closed to new replies.