文档

如何从转换中排除路径?

To exclude selected directories, provide them in the Excluded directories field in the Advanced Settings tab in the plugin settings.

In this field, you can enter a directory name or path. Here are examples:
2023
2024/01
2023,2024/01

To exclude selected files, use the following filter (in this case with the suffix “-skipped” in a filename, e.g. image-skipped.png):

add_filter( 'xio_supported_source_file', function( bool $status, string $file_name, string $server_path ): bool {
    $excluded_suffix = '-skipped';
    if ( strpos( $file_name, $excluded_suffix . '.' ) !== false ) {
        return false;
    }
    return $status;
}, 10, 3 );

Argument $server_path is the absolute server path to a directory or file. Inside the filters, you can apply more complicated rules as needed.

Changes to excluded directories and files take effect before images are converted – they do not affect already converted images. These images must be manually removed from the directory: /wp-content/uploads-xio/.

不是您正在寻找的解决方案?

请检查其他 文章 或打开一个 工单.