Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove outdated thumbnail sizes #198

Closed
codestylist opened this issue May 12, 2024 · 7 comments · Fixed by #199
Closed

Remove outdated thumbnail sizes #198

codestylist opened this issue May 12, 2024 · 7 comments · Fixed by #199

Comments

@codestylist
Copy link

I would like to request a feature to easily remove outdated image sizes without having to regenerate the thumbnails.

My situation is that I have a library of 32,000+ images, each image currently has up to 11 different thumbnail sizes. I have reduced the thumbnail sizes to 7, so four thumbnail sizes need to be deleted.

I would like to see a new parameter wp media regenerate --only-deleting added to simply delete all thumbnail sizes that are no longer needed. I know that wp media regenerate also does the job, but it also regenerates the already existing thumbnail files, which is not necessary in this case.

Hope my request makes sence for you. Thank you for all the work and time you put into wp-cli!

@swissspidy
Copy link
Member

Thanks for filing this feature request. This sounds like a duplicate of the second part of #111:

Delete thumbnail files for old unregistered sizes in order to free up server space. This may result in broken images in your posts and pages.

@swissspidy swissspidy closed this as not planned Won't fix, can't repro, duplicate, stale May 12, 2024
@codestylist
Copy link
Author

codestylist commented May 13, 2024

Thank you @swissspidy . Yes, basicly it is the same request. #111 is from 2019 (5 years old). Is there any possibility that someone will implement this request?

@swissspidy
Copy link
Member

I think so, yes, it sounds like a useful addition :) Maybe I'll even find time myself to look into it.

@codestylist
Copy link
Author

You are my hero 🥳. That would be really very useful! If you need someone to test it, please let me know. I would be more than happy to contribute something as well ☺️.

@swissspidy
Copy link
Member

#199 might do the trick.

@codestylist
Copy link
Author

You are awesome @swissspidy. I guess there is nothing I can help with, right?
Looking forward to have this implemented in the next version. Thank you very much for your time and effort!

@swissspidy
Copy link
Member

Feel free to test the PR and leave comments there :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants