Title: photon and https URLs
Last modified: August 20, 2016

---

# photon and https URLs

 *  Resolved [Will Norris](https://wordpress.org/support/users/willnorris/)
 * (@willnorris)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/photon-and-https-urls/)
 * Any particular reason Photon is limited to http URLs on port 80? I redirect all
   traffic [to https](https://willnorris.com/2012/12/all-https-all-the-time). When
   I manually remove the port and scheme checks from the jetpack plugin, photon 
   [works just fine](https://i1.wp.com/willnorris.com/content/uploads/2012/12/https-willnorris-com.png).
   So why have the seemingly artificial limitation? Is it just because the photon
   API, as currently designed, doesn’t have a place to specify the scheme or port?
 * [http://wordpress.org/extend/plugins/jetpack/](http://wordpress.org/extend/plugins/jetpack/)

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [13 years, 3 months ago](https://wordpress.org/support/topic/photon-and-https-urls/#post-3449028)
 * You’re correct, at the moment Photon is only able to resize and serve images 
   from servers that listen on port 80. That may change in the future as we work
   on improving the service, but we currently cannot serve images if you use HTTPS
   on your site.
 * You can read more about Photon here:
    [http://jetpack.me/support/photon/](http://jetpack.me/support/photon/)
 *  Thread Starter [Will Norris](https://wordpress.org/support/users/willnorris/)
 * (@willnorris)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/photon-and-https-urls/#post-3449068)
 * But that’s actually my point… you *can* serve images even if my site uses HTTPS.
   I’m doing it today. I guess it only works because I redirect http traffic to 
   https, and photon is simply following that redirect. If someone didn’t have such
   a redirect in place, then you’re absolutely right that it wouldn’t work.
 * So allow me to rephrase in the form of a question… would it be possible to add
   a filter that allows site owners to turn off the [strict https checking](http://plugins.trac.wordpress.org/browser/jetpack/trunk/class.photon.php#L441)?
 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [13 years, 3 months ago](https://wordpress.org/support/topic/photon-and-https-urls/#post-3449094)
 * Sorry for the misunderstanding. You’re absolutely right, Photon will serve images
   over HTTPS, but it can’t resize images unless they’re available over HTTP. If
   you were to configure your server to only allow images over HTTPS, Photon wouldn’t
   work.
 * But as long as you set your site to use HTTPS, and if your images are available
   over HTTP as well, everything will work properly. Photon checks for [`is_ssl()`](http://codex.wordpress.org/Function_Reference/is_ssl),
   and will write its URLs to use HTTPS if you want to.
 * You can have a look at the code here for more information:
    [http://code.trac.wordpress.org/browser/photon](http://code.trac.wordpress.org/browser/photon)
 *  Thread Starter [Will Norris](https://wordpress.org/support/users/willnorris/)
 * (@willnorris)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/photon-and-https-urls/#post-3449097)
 * actually photon **will** resize photos from https URLs. to wit:
 * original photo: [http://willnorris.com/content/uploads/2012/12/pocket-share-to-google.png](http://willnorris.com/content/uploads/2012/12/pocket-share-to-google.png)(
   this will redirect to the same URL with https)
    photo photo: [https://i0.wp.com/willnorris.com/content/uploads/2012/12/pocket-share-to-google.png?resize=100,100](https://i0.wp.com/willnorris.com/content/uploads/2012/12/pocket-share-to-google.png?resize=100,100)
 * I’ve opened a trac ticket with a patch that shows exactly what I’m proposing:
   [http://plugins.trac.wordpress.org/ticket/1653](http://plugins.trac.wordpress.org/ticket/1653)
 * Thanks.
 *  Thread Starter [Will Norris](https://wordpress.org/support/users/willnorris/)
 * (@willnorris)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/photon-and-https-urls/#post-3449160)
 * I hadn’t heard anything more on this thread or on the trac ticket, so just wanted
   to ping this and see what you thought of the patch.
 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [13 years, 2 months ago](https://wordpress.org/support/topic/photon-and-https-urls/#post-3449166)
 * We didn’t forget you! We will have a look at the patch, and we’ll reply there.
 *  [raphaelsuzuki](https://wordpress.org/support/users/raphaa00/)
 * (@raphaa00)
 * [13 years ago](https://wordpress.org/support/topic/photon-and-https-urls/#post-3449215)
 * Any news on this feature?
 * Would really be helpful with ecommerce websites.
 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [12 years, 9 months ago](https://wordpress.org/support/topic/photon-and-https-urls/#post-3449228)
 * We’ve just committed Will’s patch, and the fix will be included in the next Jetpack
   release.
    [http://plugins.trac.wordpress.org/changeset/757167](http://plugins.trac.wordpress.org/changeset/757167)
 * You will then be able to use the `jetpack_photon_bail_on_https` filter to enable
   Photon for HTTPS URLs.
 *  Thread Starter [Will Norris](https://wordpress.org/support/users/willnorris/)
 * (@willnorris)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/photon-and-https-urls/#post-3449229)
 * Thanks Jeremy, glad to see this in! One comment though is that the name of the
   filter implies the opposite of what it is doing. It says “bail on https”, implying
   that setting this to true would make it bail on https. That would be a wrong 
   assumption though, since setting it to true actually means that it *won’t* bail
   on https.
 * And technically, it’s not bailing or not bailing based on whether the link is“
   https”, it’s bailing or not based on whether it is anything other than “http”.
   In practice, that distinction is probably not important, but just pointing it
   out.
 * So maybe a filter name along the lines of “jetpack_photo_allow_https” or something
   similar would be clearer?
 * In any event, thanks for putting this in. 🙂
 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [12 years, 9 months ago](https://wordpress.org/support/topic/photon-and-https-urls/#post-3449230)
 * Oh yes indeed. We’ll change that. I’ll post a link to the changeset once it’s
   done.
 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [12 years, 8 months ago](https://wordpress.org/support/topic/photon-and-https-urls/#post-3449231)
 * We just committed [r759289-plugins](http://plugins.trac.wordpress.org/changeset/759289).
 * The filter is now `jetpack_photon_reject_https`.
 *  Thread Starter [Will Norris](https://wordpress.org/support/users/willnorris/)
 * (@willnorris)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/photon-and-https-urls/#post-3449232)
 * looks great, thanks!

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘photon and https URLs’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

## Tags

 * [HTTPS](https://wordpress.org/support/topic-tag/https/)

 * 12 replies
 * 3 participants
 * Last reply from: [Will Norris](https://wordpress.org/support/users/willnorris/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/photon-and-https-urls/#post-3449232)
 * Status: resolved