• Resolved virosept

    (@virosept)


    The plugin looks great, but how do I get the IG images to be delivered through my CDN?

    I use W3 Total Cache and Stackpath (through Cloudways) and everything works fine, but if I activate this plugin my score goes south, GTMetrix says that the IG images should be in a CDN.

    I think that those image aren′t even cached anywhere…

    Any help on this?

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

Viewing 1 replies (of 1 total)
  • Plugin Support Smash Balloon Joel

    (@joelsmashballoon)

    Hey @virosept,

    Thank you for reaching out to us for support. The plugin uses the wp_upload_dir() function to locate the uploads folder and use it for the resized local images. Some CDNs solutions seem to change what is returned here and some don’t. First, you will want to make sure that Favor Local Images is enabled under Instagram Feed > Customize > Local Images.

    You can then manually force the correct url for the images using this snippet added to your theme’s functions.php file:

    
    function sb_change_for_cdn() {
    	?>
        <script>
            window.sb_instagram_js_options.resized_url = 'https://485190-1528615-raikfcquaxqncofqfm.stackpathdns.com/wp-content/uploads/sb-instagram-feed-images/';
        </script>
    	<?php
    }
    add_action( 'wp_footer', 'sb_change_for_cdn', 99 );
    

    Let me know should you have further questions.

    Many thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘Images not delivered through CDN’ is closed to new replies.