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

WordPress Trac noreply at wordpress.org
Wed Dec 16 11:35:21 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 polevaultweb):

 In 35045.6.diff:

 Added filters for `$dirname` and `$image_baseurl`. Plugins like ours may
 store the files in a different location than on the server. For example,
 WP Offload S3 has an option for object versioning to bust CDN caches so
 images would go from the server as `2015/12/image.jpg` to S3 as
 `2015/12/15154454/image.jpg`.

 Without this filter, the check of `$dirname .  $image['file']` will still
 fail.

 Adding the filter on `$image_baseurl` has the extra benefit that we can
 rewrite the URL for the image size files instead of doing it later on the
 'wp_calculate_image_srcset' hook.

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


More information about the wp-trac mailing list