[wp-trac] [WordPress Trac] #34945: HTTPS website with HTTP images

WordPress Trac noreply at wordpress.org
Thu Dec 31 05:17:03 UTC 2015


#34945: HTTPS website with HTTP images
--------------------------------------------+--------------------------
 Reporter:  Angristan                       |       Owner:  johnbillion
     Type:  defect (bug)                    |      Status:  reopened
 Priority:  normal                          |   Milestone:  4.4.1
Component:  Media                           |     Version:  4.4
 Severity:  normal                          |  Resolution:
 Keywords:  https has-patch has-unit-tests  |     Focuses:
--------------------------------------------+--------------------------

Comment (by dd32):

 At first thought [attachment:34945.diff] seems reasonable, however on
 second thought I don't think it's the best way to go. If that was to be
 done, it should also be done within `wp_upload_dir()` directly.

 The `upload_url_path` option could be set to a CDN or other remote host
 which is only available over one scheme. It could be set to a HTTPS url
 while the current page is being served over HTTP.

 One option would be to only `set_url_scheme()` if the hostnames match.

 Another option would be to set the scheme of urls generated by
 `wp_calculate_image_srcset()` to the same scheme as in the `$image_src`,
 so it would then match what's in the post being parsed.
 However, that doesn't work with your proposed reasoning, that being, that
 existing fixes people are applying to their content might not apply to
 `srcset`s too.. those fixes are likely being handled in output buffers or
 something which runs after the srcsets are added.


 So I'm still not sold that we should be doing anything here at all. Having
 some real examples of how people are doing it which  is now broken could
 go a long way to deciding what the best method forward here is.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34945#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list