1

When started blogging, I was not aware about the image file's size, and used a lot wider and sharper images without necessity, some of the files are even 5-7mb in size. As there's no such necessity to using such a large file, even the end-user have to wait for a long time loading such images.

I know I can replace images via WordPress Media Library, but to replace images, I have to upload a new resized, squeezed version of the image to the server and then to delete the older one. Now I got another nice solution — using the Media Library Image Edit option:

With this, I can rescale the image, suppose an image originally was of 1830 × 2619, now I want it to recale to 629 × 900, then I can easily do it. enter image description here

But, I was actually doing it to reduce the file size (with its dimension) to make a big difference in the occupied Server Disk Spaces. But after the rescale there's a dropdown panel on the right saying:

Restore Original Image
Discard any changes and restore the original image. Previously edited copies of the image will not be deleted.
Restore Image

That seriously means:

  1. The Original file still resides there (so the original disk space still remains)
  2. There's a newly sized image added there (additional disk space is occupied)

But I's actually trying to replace the Original with the newly scaled image. Is that possible?

The problem is, after the rescale, I can easily delete the Original using Cpanel, but isn't that cause many other db path errors and db errors that, the Original file is missing?

I'm actually in an unanswered and uncertain state, I'm afraid. :(

2 Answers 2

0

Depending on the number of images, its probably a good idea to manually download them and run a batch script in photoshop to resize them all. Then re-upload them copying over the files in use. This plugin, Regenerate Thumbnails, may also help

2
  • I'm afraid, that's not the answer. Regenerate thumbnail regenerates the images to sizes as defined in Media Settings. But I'm not dealing with the Large, Medium or Thumbnail sizes, I'm dealing with the Original image. :( May 1, 2014 at 13:26
  • another idea is to use timthumb to serve up your images. Your users will then be served much smaller compressed images. internoetics.com/2013/12/21/… May 1, 2014 at 13:32
0

You will need to find images manually under uploads folder and replace them one by one with same name and compressed version, there does not seem to be an option in admin panel to replace existing images.

Also Regeneration of all thumbnails will be necessary, Regenerate Thumbnails plugin will be useful.

EDIT:

Enable Media Replace is useful to replace physical files in the media library.

4
  • "there does not seem to be an option in admin panel to replace existing images" - I'm afraid, but actually there is: prntscr.com/3f4v4c. May 1, 2014 at 13:12
  • Thanks, can you share steps to get this functionality? is it WordPress inbuilt OR any plugin installed.
    – Dharmang
    May 1, 2014 at 13:26
  • Insert an Inline image to a post/page, then edit the image by clicking on the Edit button (prntscr.com/3f5057), then just under the image, you can get the button. I'm using WP 3.9. May 1, 2014 at 13:33
  • It is not going to replace image file physically, it is to replace referenced image to other one. I think you are mis-guided by replace label :)
    – Dharmang
    May 2, 2014 at 5:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.