• Resolved katmacau

    (@katmacau)


    Hi. I am trying to find a solution for gallery blocks linking to the large image instead of the full size.

    I was suggest to use this filter which is compatible with a different lightbox plugin:

    function custom_check_image_size($attr){
        $attachment_img_id = attachment_url_to_postid( $attr['href'] );
        $large_attachment_image = wp_get_attachment_image_src( $attachment_img_id, 'medium' ); 
        $attr['href'] = $large_attachment_image[0];
        return $attr;    
    }
    add_filter('slb_process_link_attributes', 'custom_check_image_size',0);

    Do you have a filter for you plugin that can be hooked into the image link properties so I can make the change of the iamge link but keep using your plugin?

    Thanks.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Filter the gallery block image link size’ is closed to new replies.