[wp-trac] [WordPress Trac] #50565: Prevent attachment ID/image source mismatch when editing an image through the REST API

WordPress Trac noreply at wordpress.org
Sun Jul 5 23:56:43 UTC 2020


#50565: Prevent attachment ID/image source mismatch when editing an image through
the REST API
--------------------------+--------------------
 Reporter:  azaozz        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  5.5
Component:  REST API      |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+--------------------
 When editing an image from the Image block, it is possible that the
 attachment ID stored there may have changed. May happen after exporting
 then importing all posts to another website.

 A new (in 5.5) function `wp_image_file_matches_image_meta()` was
 introduced in [48329] to prevent this edge case. To be able to use it, the
 editor has to also pass the edited image `src`.

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


More information about the wp-trac mailing list