Support » Plugin: WP Fastest Cache » Compatibility with Brizy Plugin

  • Resolved viorel

    (@vioreleremia)


    Hi Emre,
    I’m one of the developers of Brizy plugin. Some users came to us with an incompatibility between your plugin and ours. I tried to solve it but I can’t without your help. I’m sorry I have to bother you but I really don’t see another way.
    The issue occurs when you have a cdn integration like Photon in the settings of Wp Fastest Cache. If you have a page created with our plugin and you have some images in the content when the url of images are replaced with cdn urls, that’s alright, but some images are not on the server yet because we didn’t crop them yet.
    In other words, there are some images that I can’t tell your plugin to leave them as they are. For example images with src like this: http://brizy.local/?brizy_media=AttachmentName.jpg&brizy_crop=CropSizes&brizy_post=TheCurrentPost
    should not be replaced. You can see they are some kind of dynamic urls and after the browser requested them the first time they are cropped and the next time we replace them with a static url only then this url is ready to be taken to the cdn.
    This replacement is happening in the class WpFastestCache
    function cdn_replace_urls and there I don’t have any hook to handle this exclusion with a code like this:

    
    // Code added in WpFastestCache->cdn_replace_urls()
    if ( ! apply_filters( 'wp_fastest_cache_replace_img_url', true, $matches ) ) {
        return $matches[0];
    }
    
    // Code added in Brizy Plugin.
    add_action( 'wp_fastest_cache_replace_img_url', function( $value, $matches ) {
    
        if ( false !== strpos( 'brizy_crop', $matches[0] ) ) {
            return false;
        }
    
        return $value;
    } );
    

    Regards

    • This topic was modified 1 month, 3 weeks ago by viorel.

    The page I need help with: [log in to see the link]

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