WordPress.org

Support

Support » Plugins and Hacks » Jetpack by WordPress.com » [Resolved] photon and https URLs

[Resolved] photon and https URLs

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

    @jeherve

    Jetpack Mechanic

    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/

    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?

    Plugin Author Jeremy Herve

    @jeherve

    Jetpack Mechanic

    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(), 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

    actually photon will resize photos from https URLs. to wit:

    original photo: 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

    I’ve opened a trac ticket with a patch that shows exactly what I’m proposing: http://plugins.trac.wordpress.org/ticket/1653

    Thanks.

    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

    @jeherve

    Jetpack Mechanic

    We didn’t forget you! We will have a look at the patch, and we’ll reply there.

    Any news on this feature?

    Would really be helpful with ecommerce websites.

    Plugin Author Jeremy Herve

    @jeherve

    Jetpack Mechanic

    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

    You will then be able to use the jetpack_photon_bail_on_https filter to enable Photon for HTTPS URLs.

    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

    @jeherve

    Jetpack Mechanic

    Oh yes indeed. We’ll change that. I’ll post a link to the changeset once it’s done.

    Plugin Author Jeremy Herve

    @jeherve

    Jetpack Mechanic

    We just committed r759289-plugins.

    The filter is now jetpack_photon_reject_https.

    looks great, thanks!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Resolved] photon and https URLs’ is closed to new replies.
Skip to toolbar