From the course: WordPress: WP-CLI

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Managing media

Managing media - WordPress Tutorial

From the course: WordPress: WP-CLI

Start my 1-month free trial

Managing media

- [Instructor] WP-CLI lets us do some cool things with media, like upload from an external source and easily resize all images. The list of media commands is much more focused, there are only four, but still powerful. For example, we can get a list of image sizes registered with WordPress. If we type wp media image size, you can see the list of all of the image sizes registered with WordPress, as well as their actual width and height, the type of crop, and their aspect ratio. This is helpful so you know what sizes to upload to WordPress so that they still look good with your theme. However, if you change themes or add new plugins, you might be introducing new or different image sizes. For example, if we activate 2021 here, and then look at the registered image sizes, you'll see we have a few more, including two different post thumbnails. Now, this will work fine for images uploaded after you make the change to the theme or…

Contents