Linux 软件免费装
Banner图

Image Regenerate & Select Crop

开发者 Iulia Cazan
更新时间 2023年11月15日 03:09
PHP版本: 7.0 及以上
WordPress版本: 6.4.1
版权网址: 版权信息

标签

crop cleanup wp-cli regenerate image optimization image placeholder sub-sizes details custom sub-sizes bulk regenerate bulk cleanup raw cleanup

下载

2.0.0 3.0.0 3.1.0 4.2 4.2.1 3.3 4.0 4.2.2 1.0.0 7.3.1 4.7.2 4.7.3 4.7.4 4.8 5.0 5.1 5.2 5.2.1 5.3 5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 5.4 5.4.2 5.4.3 5.4.4 5.5 6.0.2 6.1.0 4.3 4.4 4.5 4.6 4.6.1 5.0.1 6.0.0 6.0.3 6.2.0 6.2.1 7.0.0 7.0.1 7.1.0 7.2.0 6.0.1 6.2.2 7.2.1 7.2.2 7.2.3 3.2 3.4 4.1 4.7 5.4.1 7.2.4 7.2.5 7.3.0 7.3.2 7.3.3 7.3.4

详情介绍:

The plugin allows managing advanced settings for images, overriding the native medium and large crop options, and registering new custom image sizes. The plugin appends two custom buttons that allow you to regenerate and crop the images, and provides details about the image sub-sizes registered in the application and the status of each associated file. The plugin also appends a sub-menu to "Settings" which allows you to configure the plugin for global or particular post-type attached images and to enable the developer mode for debugging, if necessary. The most recent details of the plugin features are available at https://iuliacazan.ro/image-regenerate-select-crop/. The "Details/Options" button will open a lightbox where you can see all the image sizes registered in the application and details about the status of each sub-size of that image. If one of the sub-sizes files has not been found, you will see more details about this and, if possible, the option to manually generate this (for example the image size width and height are compatible with the original image). For the image sizes that are of "crop" type, you will be able to re-crop in one click the image using a specific portion of the original image: left/top, center/top, right/top, left/center, center/center, right/center, left/bottom, center/bottom, right/bottom. The preview of the result is shown right away, so you can re-crop if necessary. The "Regenerate" button allows you to regenerate in one click all the image sizes for that specific image. This is really useful when during development you registered various image sizes and the already uploaded images are "left behind". The plugin does not require any additional code, it appends two custom buttons that will be shown on the "Edit Media" page and on the "Edit Post" and "Edit Page" where there is a featured image. This works also for custom post types. Also, it can be used in different resolutions and responsive layouts.

安装:

屏幕截图:

  • Extra details about the registered and not registered image sizes and all the generated files with the option to delete individual files. The extra info is available in the lightbox, at the bottom of the list.
  • Example of advanced custom rules based on the posts where the images will be uploaded (and how to temporarily suppress the rules without removing these).
  • The general setting view with options to regenerate all images for a specific size, cleanup, general crop position, quality loss, etc.
  • Example of settings that override the crop of native image sizes and create/remove custom image sizes created with the plugin.
  • Example of the details and regenerate buttons in the media listing view for each of the attachments, to allow direct access to these functionalities.
  • Example of the details and regenerate buttons for the featured image of a post.
  • Example of the details and regenerate buttons available in the WooCommerce product gallery.

升级注意事项:

None

常见问题:

How to use the plugin wp-cli commands?

The list of wp-cli commands available with this plugin can be checked by running this command in your terminal: wp sirsc --help. This will show you a list of the available subcommands and their current description in terms of purpose, arguments types, and order:

  • cleanup -- arguments order and types: (int)site_id (string)post_type (string)size_name (int)parent_id -- the command targets images based on the relations with the specified post type, perhaps a parent, and performs the sub-sizes cleanup for all or the specified sub-sizes (delimited with a comma)
  • rawcleanup -- arguments order and types: (int)site_id (string)post_type (int)parent_id -- the command targets images based on the relations with the specified post type and perhaps a parent and performs the raw cleanup for all the files, except for the full/original sub-size
  • regenerate -- arguments order and types: (int)site_id (string)post_type (string)size_name (int)parent_id -- the command targets images based on the relations with the specified post type and perhaps a parent and performs the sub-sizes regeneration for all or the specified sub-sizes (delimited with a comma)
  • resetcleanup -- arguments order and types: (int)site_id (string)post_type (int)parent_id -- the command targets images based on the relations with the specified post type and perhaps a parent, and performs the reset cleanup for all the sub-sizes, keeping the full/original + only the registered image sizes at the moment when the command runs
The commands can be used with two flags:
  • --verbose - this attempts to give a detailed description of the execution
  • --force - available for the cleanup command

How to clean up images using wp-cli commands?

To clean up all the sub-sizes for all the images in the project you can run a command like this: wp sirsc cleanup 1 all all 0. – 1 = specifies the site/blog id in a multisite (set it to 1 in a single site install) – all = the post type (set it to all if you want the execution to happen for all post types) – all = the sub-size (set it to all if you want the execution to happen for all registered sub-sizes) – 0 = attachment parent id (leave it to 0 if you want to execute for all of the attachments, not just for the attachments of a specific post) If instead, you want to clean up only the medium sub-size, and let's say only for the pages, the command can be used like this: wp sirsc cleanup 1 page medium 0. As you can see, depending on what you are aiming to clean up, you can combine the arguments. If you are using the --force flag for the command, the targeted sub-size will be used for cleanup, even if it is not registered in the project anymore (left behind in the project by other themes or plugins that are no longer used).

How to raw clean up images using wp-cli commands?

To clean up all the sub-sizes for all the images in the project and start again with keeping only the full/original attachment file, you can run a command like this: wp sirsc rawcleanup 1 all 0. – 1 = specifies the site/blog id in a multisite (set it to 1 in a single site install) – all = the post type (set it to all if you want the execution to happen for all post types) – 0 = attachment parent id (leave it to 0 if you want to execute for all of the attachments, not just for the attachments of a specific post)

How to reset clean-up images using wp-cli commands?

To clean up all the files and metadata for sub-sizes that are no longer registered on your site, you can run a command like this: wp sirsc resetcleanup 1 all 0. – 1 = specifies the site/blog id in a multisite (set it to 1 in a single site install) – all = the post type (set it to all if you want the execution to happen for all post types) – 0 = attachment parent id (leave it to 0 if you want to execute for all of the attachments, not just for the attachments of a specific post)

How to regenerate images using wp-cli commands?

To regenerate all the sub-sizes for all the images in the project you can run a command like this: wp sirsc regenerate 1 all all 0. – 1 = specifies the site/blog id in a multisite (set it to 1 in a single site install) – all = the post type (set it to all if you want the execution to happen for all post types) – all = the sub-size (set it to all if you want the execution to happen for all registered sub-sizes) – 0 = attachment parent id (leave it to 0 if you want to execute for all of the attachments, not just for the attachments of a specific post) If instead, you want to regenerate only the medium sub-size, and let's say only for the posts, the command can be used like this: wp sirsc regenerate 1 post medium 0.

更新日志:

7.3.4 7.3.3 7.3.2 7.3.1 7.3.0 7.2.5 7.2.4 7.2.3 7.2.2 7.2.1 7.2.0 7.1.0 7.0.1 7.0.0 6.2.2 6.2.1 6.2.0 6.1.0 6.0.3 6.0.2 6.0.1 6.0.0 5.5 5.4.4 5.4.3 5.4.2 5.4.1 5.4 5.3.5 5.3.4 5.3.3 5.3.2 5.3.1 5.3 5.2.1 5.2 5.0.1 5.0 4.8 4.7.4 4.7.3 4.7.2 4.7.1 4.7 4.6.1 4.6 4.5 4.4 4.3 4.2.2 4.2.1 4.2 4.1 4.0 3.3 3.2 3.1 3.0 2.0