Skip to content
jc-vgermanov edited this page Apr 8, 2020 · 5 revisions
  1. Download, unzip and upload to your WordPress plugins directory
  2. Activate the plugin within you WordPress Administration Backend
  3. Register configuration hook in your functions.php theme file.
  4. Setup the configuration array of images sizes.

More details about the plugin configuration you can find out in this wiki.

Register configuration hook

To set configuration options you should create a new function and register a new filter hook rwd_image_sizes inside your functions.php file:

add_filter('rwd_image_sizes', 'my_rwd_image_sizes');

function my_rwd_image_sizes( $image_sizes ) {
    $my_image_sizes = array( ... );
    return $my_image_sizes;
}

If you have complex sizes with a lot of different image sizes - we recommend using a separate file to store settings. In this case, load function will look like this:

add_filter('rwd_image_sizes', 'my_rwd_image_sizes');

function my_rwd_image_sizes( $image_sizes ) {
    return include get_stylesheet_directory() . '/rwd-image-sizes.php';
}

After that you need to create a new file called rwd-image-sizes.php and set a configuration array there.

Next: Configuration array

Clone this wiki locally