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

[Feature request] Add WP CLI commands #22

Open
mklepaczewski opened this issue Feb 12, 2021 · 3 comments
Open

[Feature request] Add WP CLI commands #22

mklepaczewski opened this issue Feb 12, 2021 · 3 comments

Comments

@mklepaczewski
Copy link

Sometimes it's just easier to do things from CLI. Please consider adding WP CLI commands to:

  • optimize particular image (by attachment ID or URL ),
  • optimize particular image size (even if it's not marked as a size to be compressed).

If the feature is accepted, I'll submit PR (I need to clean up my code before I do it, so I don't want to invest time into something that might be rejected).

@mattijsvandruenen
Copy link
Contributor

Hi Matt,

Similarly to #21, I think it's fine to provide easier to use options to compress images from code outside of the plugin (ie. via the CLI tool).

I'm not exactly sure what the use cases are of compressing individual image sizes though. In the case that you add a new image size to be compressed, it's much more efficient to use the bulk compression tool to process all your existing images. It also makes the change required quite a bit larger than just offering an easy way to compress all configured image sizes of one image. In any case, feel free to submit a PR. We'd welcome anything that improves the code base!

@knofte
Copy link

knofte commented May 3, 2022

I'm +1 to having a wp-cli command available as it's the first thing tried when having issues with bulk optimiser or wanting to optimise one specific image.

@lucymtc
Copy link

lucymtc commented Sep 20, 2024

This would be really great to have, I am unable to load the bulk optimization page on sites that have enormous amount of images

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

No branches or pull requests

4 participants