How to generate file previews on WordPress with WP File Download
How often were you forced to download a file without previewing it just to evaluate if it is relevant to you? And if you are the WordPress webmaster, have you ever thought about how your files could turn out to be a nuisance instead of a service? WP File Download's latest update draws inspiration from your desktop file browser and cloud services like Google Drive by showing previews for all manners of files.
WP File Download's new preview functionality supports a wide variety of file previews, from popular image formats, like PNG or JPG, to office documents, such as DOCX and PDF. The WordPress plugin employs access control to ward off unauthorized users, as well as state-of-the-art image compression using ImageRecyle, ensuring that your users enjoy the benefits of previews without any of the associated drawbacks.
Looking for a powerful file management solution for client websites?
WP File Download is the answer. With advanced features like file categories, access
restrictions, and intuitive UI.
Impress your clients with top-notch file organization!
Previewing files on WordPress with JoomUnited's dedicated file previewer
WP File Download's latest update arrives with a dedicated file previewer that supports a slew of file formats. Now, the WordPress file manager can preview different types of images (including JPG and PNG, among others), office files (DOC, DOCX, PDF, PPT ODP, ODS, XLS, XLSX and others), and miscellaneous formats (JSON, HTML and others).
Your WordPress users can preview your files in two ways: either by clicking on the file itself, or by clicking on the preview button. By default, WP File Download opens previews in a lightbox, a box that overlays the content with a snapshot of the file. However, you can change the behavior from WP File Download's configuration, under the Main Settings' Frontend tab, to open previews in a new tab or to disable them altogether.
While loading previews, WP File Download uses one of two systems. By default, the WordPress plugin tries to preview files using its dedicated file previewer. Sometimes, however, the file previewer does not support certain file extensions, like some office documents. To handle unsupported formats, WP File Download reverts to using Google Drive's own previewer, strengthening the plugin's capabilities.
You can, of course, limit what file formats your WordPress users can preview. For example, if you don't want them to preview office documents with extensions like DOC or DOCX because these files are normally meant to be read or edited offline, just remove the extensions from WP File Download's configuration. Navigate to the Main Settings' Frontend tab like before and remove doc and docx from the field labeled extensions to open with viewer.
Lightning-quick file previews on WordPress
At this point, your greatest worry might be performance. Won't WP File Download's file previews add more overhead to your WordPress users? Not really, no. WP File Download's media previews combine different techniques to ensure that performance does not become a trade-off for previews.
First, you can use JoomUnited's previewer server to generate previews. You can enable this option from the Main Settings' Frontend tab again. Once you toggle on the switch, WP File Download generates previews automatically ahead of time instead of generating previews on the fly whenever a user clicks on a file.
Second, JoomUnited's previewer compresses all previews. WP File Download generates a few previews for any file, including DOCX or PDF documents. Then, the WordPress plugin uses ImageRecycle's image compression to optimize the generated image previews.
Limiting unauthorized access to previews
Be careful: file previews can become a security risk. Picture a file that should only be accessible to WordPress moderators, or certain members of your technical team. WP File Download automatically forbids other users from downloading it, but you would not want the same users to preview the file, would you? Previews can defeat the purpose of access limitation.
Calling all webmasters!
Enhance your client websites with WP File Download. Create secure and customizable file
repositories, allowing clients
to easily access and manage their files.
Upgrade your web design services today!
Thankfully, WP File Download has thought of securing previews as well. When toggling the JoomUnited previewer server switch, you will see another checkbox to secure generated file. This option adds the file's access limitation to previews too. In other words, if a user is not authorized to download a file, they cannot preview it either.
Thankfully, WP File Download has thought of securing previews as well. When toggling the JoomUnited previewer server, you will see another checkbox to secure generated file. This option adds the file's access limitation to previews too. In other words, if a user is not authorized to download a file, they cannot preview it either.
Do you want to integrate file previews with your WordPress blog? Check out more information about WP File Download here
When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.
Comments 15
Isn't it possible to display previews instead of the generic file icons even before the user clicks on a "preview" button? I need all images in any given folder to be displayed as preview thumbnails because otherwise, people will have to click on each individual file to find out what it looks like.
Hi, since we've implemented our file previewer we're currently working on a new theme that will display, if the file format is OK, a preview instead of the file icon. The new theme should be done in a month or so.
i really need the thumbnail function. when will you be done with it?
Hi, we're currently working on it, I hope we can push it in production in less than a month.
Cheers,
HI, I also need the thumbnail preview feature please. (shows the first page of the file as a thumbnail). when will it be ready?
Hi, the 5.4 version with the file preview in theme has just been made available today!
Is it possible to regenerate preview/thumbnail for a single file?
Hi, no currently it's not possible. How did you re-upload the file, using the plugin file update?
We could include that as a new feature.
Let me know.
Hi Tristan,
The website already used the default theme for a while, but changed for the recent Preview theme. For generating thumbnails, I used the "JoomUnited previewer server" option as mentionned above. But some files are over 10 Mb and no thumbnails were generated. I read that Google previewer should take care of those files, but it doesn't seem to. I wanted to target the few documents that are too big and see if I could try to regenerate the thumbnail. Also, the option to add a custom thumbnail could be great. So even if the file is too big, we could add the desired thumbnail and prevent blanks.
Thank you and have a nice day
OK, thanks got it, we'll investigate what we can do.
Hi Tristan,
It seems that the preview thumbnail doesn't generate automatically when a new file is uploaded. CRON is working as expected. I have to generate all images previews to see them. Is something missing?
Hi Nancy, we are currently working on a solution that will be published in the next major update. We will update the thumbnail automatically when a new file version is uploaded and if the file is too large, we will add the possibility to upload a custom preview per file.
Great news!
Thank you Tristan and have a nice day
Hi Tristan,
Is there a limited number of files we can generate? We got this error on generating preview files from the JoomUnited previewer server section :
"Too many files sent at the same time, waiting for other files we've submitted to be completed"
Generator is running : 3892 / 4122 files (stuck at this point)
Hi, the previews are generated progressively. If it's still not finished, please do contact the support and post a ticket.