• Resolved jason102178

    (@jason102178)


    Hi,

    I was wondering if someone could help me or point me in the right direction, in the past when the feature photon came out i was told that photon currently does not support https site since it can serve the images via https or something on the order of that..

    Then just today i upgraded jetpack and noticed that you guys added this enhancement
    Enhancement: Photon: New filter to let site admins/owners enable photon for HTTPS urls.

    I enabled photon then reloaded my page with the images but the url its serving is still my domain

    I am trying to enable it to work so that it works as its intended and the url should look something like this
    https://i0.wp.com/

    am i doing something wrong or is their something else i have too do.

    Thanks

    http://wordpress.org/plugins/jetpack/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    Photon is still disabled for HTTPS URLs by default. You can, however, overwrite the default behaviour thanks to the jetpack_photon_reject_https filter (#). The filter is set to true by default, but if you set it to false your images served via HTTPS will start being served by Photon.

    I hope this helps.

    Thread Starter jason102178

    (@jason102178)

    Thank you for your reply Jeremy, that did the trick, i was wondering if this was going to ever be set to enabled by default….

    Cause as of right now everytime i upgrade the jetpack plugin i will have to remember to re enable and set it to false each time.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    This won’t be enabled by default, but you don’t need to make any changes to the plugin itself to change the filter value.

    You can change the output of the filter in another plugin, or in your theme’s functions.php file, by creating your own function and hook into jetpack_photon_reject_https.

    If you’re not familiar with WordPress filters, you can read more about it here:
    http://codex.wordpress.org/Function_Reference/add_filter

    Thread Starter jason102178

    (@jason102178)

    Thanks for that information

    so would something like this work

    add_filter(‘jetpack_photon_reject_https ‘);

    the easiest way for me is to add it to my themes function.php

    or am i doing it wrong, i read the codex you provided, its a bit confuesing

    Thread Starter jason102178

    (@jason102178)

    I also tried using this one
    add_filter( ‘jetpack_photon_reject_https’, false );

    but all i get is an error
    Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    Try to add the following code to your theme’s functions.php file:

    add_filter( 'jetpack_photon_reject_https', '__return_false' );

    It’s worth noting that this will enable photon to read HTTPS content, but it’ll still return HTTP urls, like so: http://i0.wp.com

    Thread Starter jason102178

    (@jason102178)

    Hi Jeremy.

    Thanks for that code, that seemed to do the trick……

    also what do you mean its worth nothing to read https content, i thought that it would work the same weather it was http or https…

    By it reading https urls, my content is now being served through the wordpress content delivery network therefor increasing site performance, unless i am missing somthing….

    Does this not work like that for https enabled sites

    Thread Starter jason102178

    (@jason102178)

    i felt it was worth enabling https because in the past the content would not be served through wordpress content delivery network, it still gave me my website address url for images and not http://i0.wp.com

    so by enabling the https, all the images are now being served

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘enable jetpack photon https’ is closed to new replies.