News Blog: WordPress & Joomla Extensions

How to generate file previews on WordPress with WP File Download

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.

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.

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

3
Stay Informed

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.

Create stunning Galleries with the best gallery ma...
New interface and gallery thumbnails in the WP Med...
 

Comments 6

formverliebt on Wednesday, October 06 2021 09:43

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.

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.
Tristan on Wednesday, October 06 2021 10:03

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.

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.
Guest
Guest - Michael Jauch Göppinger on Monday, November 29 2021 11:14

i really need the thumbnail function. when will you be done with it?

i really need the thumbnail function. when will you be done with it?
Tristan on Monday, November 29 2021 11:52

Hi, we're currently working on it, I hope we can push it in production in less than a month.
Cheers,

Hi, we're currently working on it, I hope we can push it in production in less than a month. Cheers,
Jawid on Wednesday, January 12 2022 12:02

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, I also need the thumbnail preview feature please. (shows the first page of the file as a thumbnail). when will it be ready?
Tristan on Wednesday, January 12 2022 15:41

Hi, the 5.4 version with the file preview in theme has just been made available today!

Hi, the 5.4 version with the file preview in theme has just been made available today! :D
Already Registered? Login Here
Guest
Saturday, July 02 2022

Captcha Image