Support » Plugin: Regenerate Thumbnails » Regenerate thumbnails from scaled image not the original one

  • I want to regenerate thumbnails by taking scaled (big threshold image) image. I am using both the scaled image and the original one. The scaled images in my site are watermarked and the original one is without watermark (selling purposes). Whenever I regenerate the images the watermark is removed so I think the regenerate thumbnail plugin is taking the original one as source.
    Also before anyone mention I have all the sizes (big, medium, etc,full) watermarked just the original one is non watermarked.

Viewing 1 replies (of 1 total)
  • Plugin Author Renatho

    (@renathoc)

    Hey @hasaanch!

    You are correct! The WordPress uses the original one as source to recreate the other dimensions, and the Regenerate Thumbnails plugin leverage this feature from the core.

    If you want to regenerate your thumbnails based on your watermarked image, I’d recommend you temporarily rename your biggest watermarked image to the default image name, and after regenerating the thumbnails, you can replace the original back to the non watermarked.

    Another approach I found, would be using the wp_get_original_image_path (https://developer.wordpress.org/reference/hooks/wp_get_original_image_path/) temporarily when you run the script. So you can change the $original_image to the biggest one. But this approach will generate images with the incorrect name, like: image-2048x1024-150x150.png, so after the regeneration process you would need to rename your images removing the -2048x1024.

    Considering that you need to rename your images manually (or through script), I think the first approach would be the easier for you.

    I hope I was helpful. 🙂

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.