跳到内容

PDF-Preview inside File-Block

v1.2.3

Nic · 2026年3月4日 上架

Extends the core/file block to optionally insert a PDF preview image (generated by WordPress) before the file block and adds linking/lightbox options.

正在使用
10+
评分
5.0 / 5
累计下载
1,135
最近更新
2026年10月27日
1 条评价需要 WordPress 6.9+已测试到 7.1.5PHP 8.0+

贡献者

截图

Plugin usage in Gutenberg Editor
Plugin usage in Gutenberg Editor
Plugin settings in detail
Plugin settings in detail
Additional block style variation
Additional block style variation
Plugin settings with default values
Plugin settings with default values
Usage in Block-Editor
Usage in Block-Editor
Plugin General Settings
Plugin General Settings

Did you know that WordPress generates a thumbnail image file when uploading a PDF-file? This works when the PHP Extension imagick and Ghostscript is available! It won’t work with GD library! You know they are present and it’s working, when you upload a PDF-file in the media library and you immediately see a thumbnail of the file. Now that thumbnails are available my plugin hooks into the Gutenberg file-block to automagically inserting that thumbnail right before the file block. Besides that it also provides some more options:

Plugin Features

✔ a toggle to insert an preview image before the file block
✔ a toggle to link the preview image with the “link to” settings value of the file block
✔ a toggle to link the preview image with itself to the full-size image
✔ a toggle to enable the Lightbox-Effect on the preview image (enable in settings)
✔ a setting to choose the size of the preview image: thumbnail, medium, large
✔ a settings page to define default for image size and show inline embed default value and a height in pixels default value
✔ when activating the plugin, the show inline embed option of the file block gets disabled by default
✔ the preview image link target is based on setting of file-block (open in new tab)
✔ adds new block styles to file block with just a few inline css code
✔ this plugins main goal is to be very lightweight and avoid loading any additional assets and saving DOM performance. It just uses 3 files.

This plugin requires imagick and Ghostscript! A good WordPress web hosting has it installed by default.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums