[wp-trac] [WordPress Trac] #35045: Responsive images not added when effective scheme differs from image src scheme

WordPress Trac noreply at wordpress.org
Mon Dec 14 01:39:03 UTC 2015


#35045: Responsive images not added when effective scheme differs from image src
scheme
-------------------------------------------------+-------------------------
 Reporter:  webaware                             |       Owner:
     Type:  defect (bug)                         |  johnbillion
 Priority:  normal                               |      Status:  reviewing
Component:  Media                                |   Milestone:  4.4.1
 Severity:  normal                               |     Version:  4.4
 Keywords:  has-patch needs-testing has-unit-    |  Resolution:
  tests                                          |     Focuses:  template
-------------------------------------------------+-------------------------

Comment (by azaozz):

 image_base_url.diff wouldn't work properly. This shouldn't be changed:
 {{{
 -       $all_sizes[] = $base_url . $image_meta['file'];
 +       $all_sizes[] = $image_base_url . $image_meta['file'];
 }}}

 as `$image_meta['file']` already contains the year/month sub-dirs. If we
 want to keep it, the first block should be moved right under `$base_url =
 trailingslashit( _wp_upload_dir_baseurl() );`.

 On the other hand we only use these for comparison. Would be better to
 just strip `https?:` from both.

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


More information about the wp-trac mailing list