-
Notifications
You must be signed in to change notification settings - Fork 36
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 Tiny_Plugin::compress() for general usage by devs #21
Comments
Note that I'm aware of |
Hi Matt, Thanks for writing us here as well! I don't think the On the other hand, I do see the added value of having an easy to use function to compress an image from code outside of the plugin. For example, a function that only needs the ID of the image you want to compress. That also helps in case we do decide to change the internals of |
The plugin covers basic functionality. However, as a developer, I sometimes need to do custom tasks that aren't covered by the plugin (for example, I wrote WP CLI wrapper around the plugin). Compression is currently triggered during various events, but it seems there's no easy way to execute it manually from standalone PHP code. I propose to add
Tiny_Plugin::compress()
. Ideally, for consistency reasons, all other compression methods should rely on and call it:Tiny_Plugin::compress_on_upload()
,Tiny_Plugin::compress_image_from_library()
,Tiny_Plugin::compress_image_for_bulk()
I can submit PR if this feature request is accepted.
The text was updated successfully, but these errors were encountered: