6/22/2017 - 3:07 PM

Fishpig custom image sizes

Fishpig custom image sizes

First you will need to create a local.xml to override the functions.php that ships with Wordpress here (note, do not edit functions.php directly, as this will get overwritten!):


Then stick in the usual method of adding/updating image sizes within Wordpress (no Magento-specific bits required here!):

add_action( 'after_setup_theme', 'vero_enforce_image_size_options' );
function vero_enforce_image_size_options() {        
    add_image_size( 'video_thumb', 10, 10, true );

Now you can access your custom image size with something like the following:

echo $image->getImageByType('custom-size-name-here');

This function can be found under: