ফাইল প্রিভিউয়ার
ছবি, ডকুমেন্ট, ভিডিও, অডিও, টেক্সট ও কোড ফাইল ম্যানেজার ও ফাইল পেজেই খোলে, থাম্বনেইল আর মেম্বারের নিজের ওয়াটারমার্কসহ। ফ্রি।
The File Previewer plugin opens files where they are: pictures, video, audio, PDF and office documents, text and code show right inside the file manager, on the public file page and in shared views, instead of a plain icon. It also makes the thumbnails the grid view and the download pages use, and it can stamp a member's own watermark on the previews of folders that ask for it.
Without the plugin, every file is drawn as an icon card with its name and size, and nothing has a thumbnail.
Who it is for
Every site. A file host without previews feels broken to visitors: a photo host, a video host, a document store or a plain "send big files" site all read better when the file shows itself before anyone presses Download.
Switching it on
File Previewer is free and works with every licence. It is one of the plugins a fresh install switches on for you; if it is off, open Admin → Extensions → Plugins (the page is called Manage Plugins) and switch it on. Its settings page then appears under Extensions in the admin menu as File Previewer (/admin/plugin/file-previewer). Switching it on makes the folder uploads/thumbs/ where the thumbnails live.
What it shows
| Kind of file | What the preview is |
|---|---|
Pictures (jpg, jpeg, png, gif, webp, bmp by default) | A large preview made from the file (up to the Large preview width), served by /plugins/file-previewer/thumb?id=<file>&s=l. |
Video (mp4, m4v, webm, ogv, mov, mkv) | The site's AIO Player with its advertising layer; see Advertising. The player plays mp4, webm and ogv in every browser; other containers play where the browser can, or after the Media Converter has made an MP4. |
Audio (mp3, wav, ogg, m4a, flac, aac) | The AIO Player in its audio shape. |
| The browser's own PDF viewer in a frame, with its toolbar hidden. | |
Office documents (doc, docx, xls, xlsx, ppt, pptx, odt, ods, odp, rtf) | The Google Docs viewer or Microsoft Office online, in a frame. These viewers must be able to fetch the file, so a private or password-protected document is not sent to them: it shows the plain icon card with This document type opens after download. |
Text and code (txt, md, csv, log, json, xml, html, css, js, php, py, ...) | The text itself in a scrolling box, up to Largest text file shown. Bigger files show the card with This file is too large to show here. |
Anything else keeps the default icon card.
Thumbnails
A picture gets a 320 x 320 thumbnail (uploads/thumbs/<id>-m.jpg) the moment it is uploaded, when Make thumbnails on upload is on. Pictures that were missed - uploads while the plugin was off, imported files, a server that was too busy - are picked up by the cron job Thumbnails (previewer_thumbnails, every 5 minutes, 25 pictures a run); see Scheduled jobs. A picture whose thumbnail cannot be made (no GD or Imagick, a broken file) is marked so the cron does not try it again and again. The large preview (-l.jpg, up to the Large preview width) is made the first time somebody asks for it. Deleting a file removes its thumbnails too.
Thumbnails of other people's files are only served to visitors who may open the file (its owner, a share, a public file), unless Allow direct file links is on.
PDF thumbnails are not made in this version; PDFs open in the browser's viewer instead.
Settings
The settings page (File Previewer under Extensions) groups its options in six tabs.
General
- Show file details outside of account - Yes: a download link opens the file page with the preview. No: it downloads at once.
- Show similar files thumbnails - a row of files from the same folder under the preview.
- Allow direct file links - lets pictures be hot-linked from other sites. Off by default, which saves bandwidth.
Images
- Make thumbnails on upload - Off: the cron job makes them later.
- Image library - Automatic, GD or Imagemagick. Automatic uses GD and falls back to Imagick.
- Supported image types - comma separated extensions.
- Watermark previews - stamp the member's own watermark on previews of folders that have it switched on (see below).
- JPEG quality (82), Thumbnail width and height (320), Thumbnail resize (Cropped or Fit inside, padded), Large preview width (1600).
Documents - Document extensions, Office document viewer (Google Docs viewer, Microsoft Office online, No office preview), Document embed width and height.
Videos and Audio - the extensions that preview, and the embed width and height of each.
Text/Code - Text / code extensions and Largest text file shown (KB) (512).
The member's watermark
A member uploads a small PNG under Settings → Preferences → Watermark previews in their account, picks its position (top-left, top-right, bottom-left, bottom-right, centre) and padding, and switches the watermark on per folder (Edit on the folder). Previews and thumbnails of pictures in that folder then carry the stamp; the file itself is never changed, so a buyer who downloads gets the clean original. The site-wide switch for this is Watermark previews on the Images tab, and the owner can hide the whole feature with the setting user_watermark_previews.
Templates
The plugin page has a second tab, Templates, next to Settings. It holds five layouts for the public file page - classic, cinema, card, gallery and document - with a preview of each, a Set active button and a choice of template per kind of file (say Cinema for video and Document for PDFs and code). It is described in Download, previewer and e-mail templates.
Tips
- Keep Allow direct file links off unless you run a picture host on purpose: hot-linked pictures cost bandwidth and show no page.
- The office viewers are third-party services; if you would rather nothing left your server, choose No office preview. PDFs still show, because the browser renders those itself.
- Thumbnails are files on the main server even when the originals live on a bucket or a Direct node, so give
uploads/thumbs/room. - A huge backlog of pictures without thumbnails (after an import) clears at 25 per cron run; press Run now on Thumbnails in System Tools → Background Tasks a few times if you are in a hurry.