1. Home
  2. Docs
  3. Subscribe2
  4. Hooks, API & Customization
  5. s2_image_size


This hook allows images inserted to replace the {IMAGE} keyword to be resized. Default WordPress sizes can be used to physical sizes can be passed in an array.

function my_s2_image_size() {
    // return a pre-defined size like 'thumbnail' or 'full'
    // or return a physical size as an array like array(300, 300) or array(150, 150)
    // examples:
    return 'thumbnail';
    return 'full';
    return array(300,300);
add_filter('s2_image_size', 'my_s2_image_size');
Was this article helpful to you? Yes No

How can we help?