Cleaning up image resolutions

Posted in: Newspaper
Post count: 148

Hi Team,
When removing posts and articles, is there a maintenance way of removing the responding images as well?
Can I run that in a cron job too? Thanks.

  • This topic was modified 3 years by DocDigit.
Post count: 21065

Hello @DocDigit !

Maybe you can find a plugin which can do this for you.

Thank you!

Post count: 148

I can imagine I am not the only one with this. Are there other people who found a solution for this? Thanks.

Post count: 148

Thanks for thinking with us. I can think of a solution on this:

From the WP Menu -> Tools -> Regenerate thumbnails is an existing function that is fed by the image dimensions that are defined in Newspaper. Would it be a great idea to not only regenerate, but also check if the image, that will be regenerated, is actually linked to a page or post? If not, we then can opt to delete the applicable image thumbnails to be deleted instead of being regenerated, thus leaving only the original image existing and available in the Media folder.

Anyone interested in developing this great function with us? I am not a programmer, but I think there might be an opportunity using WP-CLI to do this! @ https://wp-cli.org/

  • This reply was modified 3 years by DocDigit.
  • This reply was modified 3 years by DocDigit.
  • This reply was modified 3 years by DocDigit.
  • This reply was modified 3 years by DocDigit.
Post count: 148

What I now do is before removing a posting, I check the image name (example.jpg) that belongs to it. Then I perform a ‘find’ in Unix and detect all images that have the ‘example-‘ (watch the hyphen) notation thus leaving out the original image in my media library and delete them by hand.
Someone in for a short script? Unfortunately I am not a programmer ;-(

Post count: 21065

Hello @docdigit !

For customization and other services, you can contact our custom work team here: https://tagdiv.com/premium-customization-services/.

Thank you for understanding!

Post count: 148

Thanks, request has been sent. As it will benefit all users of Newspaper (maintenance wise) I hope it will be available for all of us. Happy weekend, Jos

  • This reply was modified 3 years by DocDigit.
Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newspaper’ is closed to new topics and replies.