[Resolved] Photon Image CDN Issue

Home Forums Support Photon Image CDN Issue

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #860786
    Rizki Alief Irfany

    Hi there,

    I use image CDN from here : https://bit.ly/2Uzyca7 for my 2 sites with different theme. The 1st use GP ( listed in the site url ) and the 2nd use other theme ( page sample : https://bit.ly/2uNfsVU ).

    When I open these 2 sites and check the source code ( ctrl + u ) i see all image url have changed to https://i0.wp.com/domain.com/wp-content/uploads/:image-directory. It means that CDN works normally.

    But when I open these 2 sites and open some image in new tab, my GP’s site bring up image with original url. When I open new tab image from my 2nd site ( page sample : https://bit.ly/2uNfsVU ), it bring up image with CDN url. Shouldn’t it be like this ?

    Why is it different ? You can try it yourself to better understand my point.

    GeneratePress 2.2.2
    GP Premium 1.7.8
    #860977
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    I’m not familiar with how Photon works, but I don’t see why GP would be any different as it doesn’t do anything fancy/different when it comes to adding images.

    Can you link me to a page using GP? How are you opening the image in a new tab?

    Have you tried with the actual Photon feature in Jetpack?

    #861020
    Rizki Alief Irfany

    Hi Tom,

    I also think so. Even I use same plugin list in my 2 sites, so there should be no difference.

    My GP site : https://aliefirfany.com. You can try open any image on that site using right click >> open in new tab. Image opened with original url. Compare with my 2nd site : https://bit.ly/2uNfsVU with other theme, image opened with cdn url when I click right open in new tab.

    I’ve tried Jetpack, the results are same.

    #861024
    Rizki Alief Irfany

    Hi Tom,

    I have another example. This is my GP site : https://bit.ly/2UyMV4Z. And my 2nd site use Twenty Nineteen : https://bit.ly/2ORtU8z. Try right click and open any image in new tab on both my sites. See the difference of image url.

    fyi, the 2 sites just installed, so there hasn’t been any changes.

    #861462
    Tom
    Lead Developer
    Lead Developer

    It looks like images that are using srcset aren’t working with your PhotonCDN code.

    You can disable srcset to test:

    add_filter( 'wp_calculate_image_srcset', '__return_false' );

    #861468
    Rizki Alief Irfany

    Amazing 😀 It works Tom. Big thanks for you.

    But may I know, what is the “srcset” function ? Is srcset only in GP ?

    #861634
    Tom
    Lead Developer
    Lead Developer

    Glad I could help 🙂

    srcset is a core WordPress thing. It makes it so different image sizes are served to different screen sizes.

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