Ben
Ben is a lifelong Nintendo fan who likes to build websites, and make video games. He buys way too much Lego.
WordPress and Games
I recently switched Binary Moon over to using secure domains. This was quite easy using Cloudflare, however one of the things that didn’t work was making Photon work with https.
Since https implies security Photon disables itself on secure domains (so that no private information can be transferred) – however on Binary Moon I am the only user who logs in, and the images are all public anyway – so I wanted to disable this and serve the resized images over https.
A bit of Googling later and I find a really simple toggle that I added to allow Photon to work on https.
// Allow photon on secure url. add_filter( 'jetpack_photon_reject_https', '__return_false' );
Today I found a separate blog post by Jeremy Herve, one of the Jetpack developers, who goes over this AND how to enable https on WordPress using Cloudflare. To be honest it would have saved me a decent amount of time had I found this first! 🙂
I ran into this issue on a few client sites that we converted to https, so I made a plugin for it: https://wordpress.org/plugins/accept-https-with-jetpack-photon-and-tiled-galleries/
Hi, where I should add this line of code?:
add_filter( ‘jetpack_photon_reject_https’, ‘__return_false’ );
Hi – this could either go in a very simple plugin, or added to the bottom of your themes functions.php file.
thx!
This tweak is no longer necessary, Photon now supports HTTPS by default (since Jetpack 3.9).
Thanks for the update Robert – good to know!