Media Changes in 4.7

This post provides an overview of the changes to the Media component in WordPress 4.7. See a list of all the 4.7 media tickets.

Two notable changes, enhanced PDF support in the media library and changes to the default fallbacks for alt attributes, are explained in separate posts.

Make media library searchable by file name (#22744)

Before 4.7, if you uploaded a file to the media library and changed the title, it wasn’t possible to find that file again by searching for the file name. Now, attachment search queries will also include matches to the _wp_attached_file post meta value.

Other enhancements and bug fixes

  • Added a $wp_error parameter to wp_insert_attachment() (#37813)
  • Fix Drag/Drop Ordering of Media in Chrome on touch enabled devices (#31652)
  • Avoid undefined offset notice in wp_prepare_attachment_for_js() when image_downsize filter in used in (#34437).
  • Improve docs for image_send_to_editor filter (#34823).
  • Use wp_get_attachment_metadata() instead of get_post_meta() where appropriate (#36246).
  • Ensure wp_get_attachment_link() output text for non-images (#37343).
  • Avoid undefined index notices when pathinfo() is used (#37608).
  • Improve alignment of inputs and button heights in media edit screens (#37806).
  • Set focus when closing the media modal (#38142).

#4-7, #dev-notes, #media