Support » Plugin: WP Recipe Maker » Setting the size of clickable Instructions Image

  • Resolved Timofey Drozhzhin


    Hi, how do you set the size of the clickable instructions image?

    Looking at the code, it seems that the instruction images are hard coded to link to Full image class-wprm-sc-instructions.php -> $full = wp_get_attachment_image_src( $instruction['image'], 'full' );.

    Is there a way to override the link to full image into a custom image size? If not, do you think it would be possible to add a filter or pull settings, i.e. WPRM_Settings::get()?

    Our original images are 5-10mb in size.

    Thanks a bunch!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Brecht


    You could use the filter hook for the instructions block:

    function wprm_recipe_instructions_shortcode( $output, $atts, $recipe ) {
        // Adjust the $output here.
        return $output;
    add_filter( 'wprm_recipe_instructions_shortcode', 'wprm_recipe_instructions_shortcode', 10, 3 );

    Thanks Brecht! Got it working!

    I would love if you would consider adding the image size to the shortcode, i.e. [wprm-recipe-instructions header="Instructions" image_size="thumbnail" image_link_size="large"].

    BTW – it looks like you have a minor typo line 201 class-wprm-sc-instructions.php $style .= 'max-width: ' . $image_data[1] . 'px;';. The $style hasn’t been previously defined.

    Plugin Author Brecht


    Happy to hear you got things working and thanks for pointing out the typo!

    Will look into adding that as a parameter.

    Plugin Author Brecht


    Hi again,

    I wanted to let you know we just released WP Recipe Maker 5.2.1 which adds a setting on the WP Recipe Maker > Settings > Lightbox page to specify the thumbnail size you want the clickable images to link to.

    Thanks again for the feedback!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.