[wp-trac] [WordPress Trac] #39562: Responsive images: Changing upload path for new attachments will cause srcset path bug

WordPress Trac noreply at wordpress.org
Thu Jan 12 14:58:15 UTC 2017


#39562: Responsive images: Changing upload path for new attachments will cause
srcset path bug
--------------------------+-----------------------------
 Reporter:  zairwolf      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.7
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 for old attachments I used `define( 'UPLOADS', 'wp-content/uploads_1' );`

 for new ones I used `define( 'UPLOADS', 'wp-content/uploads_2' );`

 but when I visit old posts, the attachments' srcset path became
 `uploads_2` while not `uploads_1`. It caused 404.

 in `wp-includes/media.php` -> `function
 wp_make_content_images_responsive()` it uses the current upload path
 setting to generate all srcset, which is not right for old attachments.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39562>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list