Title: Include WP-CLI support
Last modified: February 11, 2020

---

# Include WP-CLI support

 *  [Luke Cavanagh](https://wordpress.org/support/users/lukefiretoss/)
 * (@lukefiretoss)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/include-wp-cli-support/)
 * Include WP-CLI support so that you can optimize images from command line and 
   outside of wp-admin.

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Tinify](https://wordpress.org/support/users/tinify/)
 * (@tinify)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/include-wp-cli-support/#post-12425824)
 * Hi Luke,
 * Thank you for your suggestion.
 * Can you share with us what would your use case be for needing this?
 *  Thread Starter [Luke Cavanagh](https://wordpress.org/support/users/lukefiretoss/)
 * (@lukefiretoss)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/include-wp-cli-support/#post-12426190)
 * The use case would be able to run image optimization outside of wp-admin using
   a WP-CLI command.
 *  Plugin Author [Tinify](https://wordpress.org/support/users/tinify/)
 * (@tinify)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/include-wp-cli-support/#post-12435720)
 * Hi luke,
 * We will keep this in mind and if it receives enough interest we will consider
   putting it on our roadmap as a feature.
 *  [Vinobe](https://wordpress.org/support/users/tomcent/)
 * (@tomcent)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/include-wp-cli-support/#post-13175672)
 * I was here just to request the same functionality, with a good argument i.m.h.
   o.
 * Why: I added a new image size while developing a custom theme for a client.
    
   Therefore I needed to regenerate thumbnails fast for this new image format. I
   used WP CLI for that as that is the fastest method. But now none of my cropped
   images are tiny anymore. I will have to run it through back-end again which is
   slower, AND I will have to use extra tinyPNG credit to “re-tiny” the images that
   were already tiny before, but were undone by the WP CLI command.
 * This feature is highly requested for me, I work for an agency and we are planning
   to implement tinyPNG on all future client websites from now on. Under the condition
   that WP CLI is supported.
 * **EDIT:**
    For the fun of it, check this image: [https://imgur.com/a/9fjt5YY](https://imgur.com/a/9fjt5YY)-
   36.2% savings (yes, minus)
 * Thanks
    -  This reply was modified 5 years, 10 months ago by [Vinobe](https://wordpress.org/support/users/tomcent/).
      Reason: Added screenshot
 *  Plugin Author [TinyPNG](https://wordpress.org/support/users/tinypng/)
 * (@tinypng)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/include-wp-cli-support/#post-13181543)
 * Hi Vinobe,
 * Thank you for the request, we’ll add your arguments to our list of potential 
   features.
 * Does the bug with the negative savings occur after you use the CLI to regenerate
   all thumbnails?
 *  [Vinobe](https://wordpress.org/support/users/tomcent/)
 * (@tomcent)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/include-wp-cli-support/#post-13184406)
 * [@tinypng](https://wordpress.org/support/users/tinypng/) That is correct! 😀
 * I ran the command “wp media regenerate” –> yes
    I did not yet regenerate thumbnails
   through back-end after that. After that de negative savings was visible.
 * FYI: We use a plugin (WP media folders – by joomunited) which has an easy button
   for that, and that does seem to trigger the tinyPNG plugin correctly (so probably
   the same for other plugins that support this trigger), it’s only through CLI 
   that your functions do get not triggered and therefore are undone/untinied.
 * Thanks for taking this feature in consideration. We use WP CLI for a lot of things
   as it is powerfull and fast.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Include WP-CLI support’ is closed to new replies.

 * ![](https://ps.w.org/tiny-compress-images/assets/icon-256x256.png?rev=3448487)
 * [TinyPNG - JPEG, PNG & WebP image compression](https://wordpress.org/plugins/tiny-compress-images/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tiny-compress-images/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tiny-compress-images/)
 * [Active Topics](https://wordpress.org/support/plugin/tiny-compress-images/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tiny-compress-images/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tiny-compress-images/reviews/)

## Tags

 * [tinypng](https://wordpress.org/support/topic-tag/tinypng/)
 * [wp-cli](https://wordpress.org/support/topic-tag/wp-cli/)

 * 6 replies
 * 4 participants
 * Last reply from: [Vinobe](https://wordpress.org/support/users/tomcent/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/include-wp-cli-support/#post-13184406)
 * Status: not a support question