PDF Image Previews Among the Improvements to Media in WordPress 4.7

Among the many enhancements in WordPress 4.7 are improvements to the media component. Previous to 4.7, users who uploaded files to the media library and changed the title could not search for them by file name. Four years since the ticket was created, users will be able to search for media by filename.

PDFs are easier to preview as the media library will create an image preview of the first page. This image is used throughout the library and media attachment screens.

PDF Preview Images in the WordPress Media Library
PDF Preview Images in the WordPress Media Library

In order to generate the previews, the webhosting server needs to support Imagick, ImageMagick, and Ghostscript. If support is not detected, WordPress will fall back and save the attachment without adding a preview image.

WordPress 4.7 also removes the caption text and the image title fallbacks to generate alternative text. Developers are encouraged to read the detailed notes surrounding PDF previews to ensure compatibility with WordPress 4.7. There’s also a handful of other changes to media that users and developers can read here.

Would you like to write for WP Tavern? We are always accepting guest posts from the community and are looking for new contributors. Get in touch with us and let's discuss your ideas.

8 Comments


  1. This means that the “PDF Image Generator” plugin code will be included in WP core?

    Report


  2. When can we get some out-of-the-box support for SVG’s? Allowing SVG uploads by default and creating preview images would be wonderful!

    Report

Comments are closed.