[wp-trac] [WordPress Trac] #35648: the_post_thumbnail sets srcset with http protocol

WordPress Trac noreply at wordpress.org
Mon Mar 14 11:51:25 UTC 2016


#35648: the_post_thumbnail sets srcset with http protocol
-------------------------------------+------------------------------
 Reporter:  javiertoledos            |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Media                    |     Version:  4.4
 Severity:  normal                   |  Resolution:
 Keywords:  reporter-feedback https  |     Focuses:
-------------------------------------+------------------------------

Comment (by joshringer):

 Following the code trail: For src, comes from
 `wp_get_attachment_image_src` <- `image_downsize` <-
 `wp_get_attachment_url` where the url is fixed using `set_url_scheme`.
 This doesn't happen for srcset, which pulls its base url straight from
 `_wp_upload_dir_baseurl`.
 Presumably, this could be fixed just after this point (search for
 `$image_baseurl` in `wp_calculate_image_srcset`), in a similar manner.
 Might be worth investigating putting it lower down in the root
 `wp_upload_dir`, though?

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


More information about the wp-trac mailing list