• Resolved lgdelai

    (@lgdelai)


    Hello,

    I’ve enabled the “Accept image upload” option of Jet-Pack, but, images I add to the slider are not being accelerated ?? they are displaying an alert by gtmetrix system.

    >In the YSlow option:
    >Use the Content Delivery Network (CDN)

    Only the images that are added to the pro slider are reported as not optimized by the jetpack cdn.

    See I’m talking about creating a slide with only images selected by me. other than a recent posts slide that displays the cover image of the post, the latter is working normally.

    How to solve this??

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author bqworks

    (@bqworks)

    Hi,

    Probably JetPack doesn’t handle images added in that way to the slider. Please try to link directly to the CDN images, by specifying the link in the Main Image editor (first button on the slide panel). Or you could change the links dynamically, by using the slider’s API:

    add_filter( 'sliderpro_markup', 'sp_change_urls' );
    
    function sp_change_urls( $slider ) {
        $slider = str_replace('domain.com', 'cdn-domain.com', $slider);
    
        return $slider;
    }

    Another option would be to create a dynamic slider which loads the images from a [gallery]: https://www.youtube.com/watch?v=Bj8xSH-sScY If sliders with featured images work fine with JetPack, this method might work as well.

    Best,
    David

    Thread Starter lgdelai

    (@lgdelai)

    Look,

    When I create a slide, which will display the recent posts, the images displayed in it are fetched from the CDN.

    However, if I create a slide and insert the images by selecting them directly in the library, the jetpack does not store these images in cdn.

    If I use the image link stored in cdn the error will not occur.

    What is happening is that Jetpack is not looking for the images for your CDN when they are added directly from the library. and consequently GTMetrix accuses that these images are not on a CDN.

    Is there any way around this.

    Plugin Author bqworks

    (@bqworks)

    When you manually select an image to add it to the slider, the slider simply copies the URL of the image. That URL then is not handled by Jetpack because Jetpack, from my understanding, doesn’t search for and replace raw URL’s added to the post, but it uses a WordPress filter which is applied to images added directly to the page or featured images (this is why using featured images in the slider will load the CDN version). Some ways around this are those I mentioned above.

    – You could specify the URL to the CDN images instead of the default URL

    – You could use a a filter provided by the slider’s API to dynamically change the URL without having to manually specify the CDN URL. The PHP code for that is in my previous reply. You would have to add it in the theme’s functions.php file.

    – Instead of creating a static slider you could create a dynamic slider which loads images from a [gallery]. Those images will be served similarly to how featured images are served, so it might load the CDN version.

    Best,
    David

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Imagens do slider pro n?o est?o sendo otimizadas pelo jetpack’ is closed to new replies.