apply_filters ( 'jetpack_photon_reject_https', bool $reject_https )

Allow Photon to fetch images that are served via HTTPS.

Source file: class.photon.php

View in GitHub

Parameters

$reject_https

(bool) Should Photon ignore images using the HTTPS scheme. Default to false.


Changelog

Since: Jetpack 2.4.0


Notes

By default, Jetpack’s Photon service will fetch and serve all images on your site, whether you use HTTP or HTTPS. You consequently do not need to use this filter to be able to use Photon on a site using HTTPS.

However, in some situations you may not want Jetpack to serve your HTTPS images. In such edge-cases, you can use this filter like so:

add_filter( 'jetpack_photon_reject_https', '__return_true' );

Have a note to contribute?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Comments

  1. Discount Flux says:

    when i enable “speed up image load time” button but button not enabled and when i enable button for image optimize and also show “updated” small popup on top-right side but when i refresh the page then again button show as disable. finally on my site jetpack not working properly

  2. diouldebalde says:

    Pourquoi mon premier image du site ne se désactive pas ?

  3. I use the filter in Snippet but the images still don’t load. In the end I need to disable the “Speed up image load times” option.

    Also, I wonder what that option really do? I see that it changes the srcset from http to https, and that’s all? How does using https link reduce loading time?

    • Dat Hoang says:

      Hi,

      Also, I wonder what that option really do? I see that it changes the srcset from http to https, and that’s all? How does using https link reduce loading time?

      You can find the answer in our “Notes” section above.

      • Using this filter so Jetpack Image CDN (formerly Photon) will not serve your HTTPS images. In other words, HTTPS images will from your site directly instead of our CDN.
      • This filter has nothing to do with reducing loading time. Due to some reasons, some users do not want to load their HTTP images, that’s why this filter exists.
      • In most cases, you do not need to use this filter. Please contact us as mentioned below so we can look at your site and advise.

      I use the filter in Snippet but the images still don’t load. In the end I need to disable the “Speed up image load times” option.

      Please contact us from https://jetpack.com/contact-support/ and let us know more info: why you need to use this filter, what your site is. We’re happy to discuss this with you further.