{"id":982,"date":"2024-02-21T14:44:55","date_gmt":"2024-02-21T14:44:55","guid":{"rendered":"https:\/\/imagify.io\/documentation\/?p=982"},"modified":"2024-10-15T18:48:17","modified_gmt":"2024-10-15T18:48:17","slug":"how-to-use-wp-cli-for-imagify","status":"publish","type":"post","link":"https:\/\/imagify.io\/documentation\/how-to-use-wp-cli-for-imagify\/","title":{"rendered":"How to use WP CLI for Imagify"},"content":{"rendered":"\n<p>Here is a short guide on how to use WP CLI for Imagify:<\/p>\n\n\n\n<p><code>wp imagify bulk-optimize &lt;contexts&gt;... [--lossless]<\/code><\/p>\n\n\n\n<p>Where contexts can be&nbsp;<code>wp<\/code>&nbsp;and&nbsp;<code>custom-folders<\/code>, you can use one or the other or both, separated by a space.<\/p>\n\n\n\n<p>Adding the&nbsp;<code>--lossless<\/code>&nbsp;option will use the lossless compression &#8211; `wp imagify generate-missing-webp &lt;contexts&gt;`<\/p>\n\n\n\n<div class=\"message-panel orange\"><i class=\"fa fa-exclamation-circle\"><\/i><span class=\"message-panel__title\">Note<span class=\"message-panel__message\">There&#8217;s an active issue related to next-gen generation via WP CLI which can be tracked here:<a href=\"https:\/\/github.com\/wp-media\/imagify-plugin\/issues\/885\" target=\"_blank\" rel=\"noopener\"> Github<\/a>.<\/div>\n\n\n\n<p>Same thing for the contexts.<br>You can type&nbsp;<code>wp help imagify bulk-optimize<\/code>&nbsp;and&nbsp;<code>wp help imagify generate-missing-webp<\/code>&nbsp;to get the info too on the command line.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a short guide on how to use WP CLI for Imagify: wp imagify bulk-optimize &lt;contexts&gt;&#8230; [&#8211;lossless] Where contexts can be&nbsp;wp&nbsp;and&nbsp;custom-folders, you can use one or the other or both, separated by a space. Adding the&nbsp;&#8211;lossless&nbsp;option will use the lossless compression &#8211; `wp imagify generate-missing-webp &lt;contexts&gt;` NoteThere&#8217;s an active issue related to next-gen generation [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-982","post","type-post","status-publish","format-standard","hentry","category-image-optimization"],"_links":{"self":[{"href":"https:\/\/imagify.io\/documentation\/wp-json\/wp\/v2\/posts\/982","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/imagify.io\/documentation\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/imagify.io\/documentation\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/imagify.io\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/imagify.io\/documentation\/wp-json\/wp\/v2\/comments?post=982"}],"version-history":[{"count":6,"href":"https:\/\/imagify.io\/documentation\/wp-json\/wp\/v2\/posts\/982\/revisions"}],"predecessor-version":[{"id":1137,"href":"https:\/\/imagify.io\/documentation\/wp-json\/wp\/v2\/posts\/982\/revisions\/1137"}],"wp:attachment":[{"href":"https:\/\/imagify.io\/documentation\/wp-json\/wp\/v2\/media?parent=982"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/imagify.io\/documentation\/wp-json\/wp\/v2\/categories?post=982"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/imagify.io\/documentation\/wp-json\/wp\/v2\/tags?post=982"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}