skip to Main Content

I have been managing a wordpress site for many years and in the past when I was less experienced I deleted the original images. This hasn’t been a problem until now because wordpress uses scaled and resized version.
But now I need to regenerate some image sizes and obviously it’s not possible to do that because all the plugins use the original images as source.

Therefore, I don’t have the original of many images, but I have the scaled version with good enough resolution (1280×720).

Unfortunately none of the regeneration plugins was designed for a situation like mine. Also in my searches I haven’t found anyone with the same problem.

Is it possible to regenerate the original image starting from the scaled version?

I need to make a script who:

  1. List attachment
  2. Check if exist
  3. If not, create a new file duplicating 1200×900 versione
  4. Rename the file just duplicated

2

Answers


  1. I don’t think there is a solution for your case.
    I’d first go to my old backups and look for the original images, also you can ask your hosting company for assistance.
    If this doesn’t help, I’d contact a designer to rebuild the images.

    Login or Signup to reply.
  2. Depending on if you used a plugin or not to scale/optimize the images after its upload, wordpress is usually storing the images in its /uploads folder like this:

    • your-image.png (original)
    • your-image-150×100.png
    • … (for all resolutions which you set up an image will be generated)
    • your-image-1280×720.png

    So if I understand it correctly, you deleted the original. What happens if you duplicate the "your-image-1280×720.png" file and delete the resolution?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search