Recently, one of readers users asked if it was possible to regenerate PDF thumbnails for old uploads in WordPress? In WordPress 4.7, you now have thumbnail previews for all new PDF files. However, this change does not affect older uploads. In this article, we will show you how to regenerate PDF thumbnails in WordPress for older uploads.
Why and Who Needs to Regenerate PDF Thumbnails?
WordPress introduced PDF thumbnail previews in WordPress 4.7. This feature creates image previews of the first page of a PDF file uploaded using media uploader.
However, this feature only works on new PDF files that you uploaded after updating your site to WordPress 4.7.
All older PDF files will still appear as a generic icon in the media library, and you will still have to use a PDF plugin to show a thumbnail preview on attachment pages.
If you regularly upload PDF files, then you will need to regenerate thumbnail for your older PDF uploads.
Having said that, let’s take a look at how to regenerate PDF thumbnails for older uploads in WordPress.
Regenerate PDF Thumbnails in WordPress
Before you move on, please make sure that you are using WordPress 4.7 or higher. Also make sure that you have imagemagick extension installed on your server.
You can test imagemagick by simply uploading a PDF file to your WordPress site. If it shows a thumbnail preview for your PDF file, then you are good to go.
Please note, that the plugin we are going to use in this article, will regenerate thumbnails for all your older image files as well. As a precaution, backup your WordPress site or at least backup your
First thing you need to do is install and activate the Force Regenerate Thumbnails plugin.
The plugin is hosted on GitHub. If you haven’t installed plugins from GitHub before, then take a look at our guide on how to install WordPress plugins from GitHub.
Upon activation, you need to visit Tools » Force Regenerate Thumbnails page.
Here you can regenerate thumbnails for all images and PDF files you uploaded using WordPress media uploader. Click on ‘Regenerate All Thumbnails’ button to continue.
The plugin will now start processing all images on your website. It will take some time, depending on how many images and PDF files you have.
Once finished, you can visit Media » Library page and you will be able to see thumbnail previews for your old PDF uploads.
The plugin also allows you to regenerate thumbnails for individual files. If you do not have many PDF files, then it would be better to regenerate thumbnails individually.
You will need to visit Media » Library page and switch to the list view by clicking on the list view button.
After that take your mouse over to a PDF file, and you will be able to see ‘Force regenerate thumbnails’ link.
Clicking on the link will regenerate thumbnails for that particular file.
Once you have regenerated thumbnails for all your old PDF uploads, you can safely deactivate and delete the plugin. Uninstalling or deleting the plugin will not delete the thumbnails regenerated by the plugin.
We hope this article helped you regenerate PDF thumbnails for old uploads in WordPress. You may also want to see our list of 24 must have WordPress plugins for business websites.
Rojenx is a leading concept artist who work appears in games and publications
Check out his personal gallery here