[wp-trac] [WordPress Trac] #36899: The srcset attribute (Responsive images) always returns the local URL of the file, not the URL on a CDN

WordPress Trac noreply at wordpress.org
Sat May 21 13:55:59 UTC 2016


#36899: The srcset attribute (Responsive images) always returns the local URL of
the file, not the URL on a CDN
---------------------------+------------------------------
 Reporter:  kameraadpjotr  |       Owner:  joemcgill
     Type:  defect (bug)   |      Status:  reviewing
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Media          |     Version:  4.5.2
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------
Changes (by joemcgill):

 * owner:   => joemcgill
 * status:  new => reviewing


Comment:

 Hi @kameraadpjotr,

 Thanks for the report. If you're using a plugin to rewrite the image `src`
 attributes to point to your CDN, then you may need to get in touch with
 the plugin author about making sure the `srcset` attributes are also being
 rewritten. If you're handling this yourself, you can make use of the
 `wp_calculate_image_srcset` filter to convert all of the files in the
 `srcset` attribute to point to the files on your CDN.

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


More information about the wp-trac mailing list