How To Regenerate Thumbnails In WordPress When Using PDF Files
Recently a user asked if he can regenerate PDF thumbnail for use in WordPress. Well, it is definitely possible. Thanks to WordPress 4.7 ! WordPress 4.7 or higher, features thumbnails previews of all new PDF files. However, the change has no impact on older uploads. This blog will guide you on how to regenerate PDF thumbnails in WordPress website for uploads that are older.
Reason to Regenerate PDF Thumbnails
Thumbnails are PDF images you can see before you download them. This helps travelers find what they want when the title becomes confusing. For example, it is like there are different versions of textbooks but all of them keep the same name.
These PDF images are widely used to generate image from PDF in WordPress. To display a thumbnail preview of attachment pages, you must apply the PDF plugin. Hence, the appearance of all PDF files that are old will be a general symbol in your WordPress media library.
If you regularly upload PDF files on your WordPress website then you must regenerate thumbnails of older PDF uploads.
WordPress introduced PDF thumbnail previews in WP 4.7. This feature creates image previews of the first page of a PDF file uploaded using a media uploader.
However, this feature only works on new .pdf extension files that have been uploaded after updating site to WordPress 4.7 or later.
All older PDF files will still appear as a generic icon in the media library, and will use a PDF plugin to show a thumbnail preview on attached pages.
If the files are uploaded regularly, then there will be the need to regenerate thumbnail for older PDF uploads.
It is similar to regenerating thumbnails for images after adding new image sizes to WP theme.
How to Regenerate PDF Thumbnails in wordPress
Ensure you have upgraded your WordPress to WordPress 4.8 before you start the process. Besides, you should ensure that you have installed ImageMagick extension on the server you are using.
Now, follow simple steps:
- upload PDF files on your WordPress website
- Test your ImageMagick.
- Proceed with the process when the extension displays a thumbnail preview of the PDF file.
However, the plugin we will use in our case can regenerate thumbnails of both older files and images. Also, it is recommended that you create a backup. It should be of contents, files and folders of your WordPress website. Besides, this complete backup should be taken before you start regenerating thumbnails.
Once activated, move to tools and open the Force Regenerate Thumbnails page. As a result, you will be able to regenerate thumbnails of all PDF files and images. But, these are files and images you have ever uploaded on WordPress site using the media upload.
To start the regeneration of the thumbnails:
- Click the "Regenerate All Thumbnails" button.
- Processing will start.
- Based on the number of PDF files and images, the processing time by the plugin on your images will vary.
- move to the media bar.
- Open the library page, and then click the list view for display.
- Now move your mouse over a PDF file, and a ‘Force regenerate thumbnails’ link will appear.
- To regenerate small images of the file, click the link.
I hope this blog made regenerating PDF thumbnails in WordPress easy for you. Do let us know in the comment section, if this blog was helpful to you or not. Do read our blogs for more helpful tips and guides on WordPress.