Rapls PDF Image Creator Manual (Free)
How to use the free plugin that turns a PDF’s cover into an image and sets it as the featured image.
Version 1.4.45 | WordPress 5.0+ | PHP 7.4+
01About the plugin
When you upload a PDF to the Media Library, the plugin converts a page of it into an image and sets that image as the PDF’s featured image. The conversion uses the PHP Imagick extension (ImageMagick).
- Automatic: the thumbnail is made at upload.
- Every size: full size plus every image size your theme registers.
- No blank saves: a page that is one flat colour counts as a failed render and is not saved.
- Colour management: CMYK PDFs are converted to sRGB through ICC profiles.
- A reason: when it can’t make a thumbnail, the Status tab and Site Health say why and what to do.
- No processes: it never uses
exec()or anything like it, so it works on locked-down shared hosting.
02Requirements
| WordPress | 5.0 or later |
|---|---|
| PHP | 7.4 or later |
| Imagick extension | Required. It is how PHP talks to ImageMagick. |
| PDF reading | ImageMagick’s security policy (policy.xml) must allow reading PDFs. ImageMagick draws PDFs with the Ghostscript installed on the server. |
Most shared hosts qualify. After installing, the Status tab tells you whether yours does.
03Installation
- In the dashboard, open Plugins → Add New and search for “Rapls PDF Image Creator”.
- Click Install Now, then Activate.
- Open Settings → Rapls PDF Image Creator and check the requirements on the Status tab.
- Upload one PDF and confirm a thumbnail appears.
The settings screen has three tabs: Settings, Bulk Generate and Status.
04Check the Status tab
Settings → Rapls PDF Image Creator → Status. “Server Status” shows whether this server can render PDFs. The answers come from reading PDFs built in memory, not from version numbers.

| Row | What it tells you |
|---|---|
| Imagick Extension | Whether the Imagick extension is loaded. |
| ImageMagick Version | The ImageMagick version. |
| PDF Support | Whether PDFs can be read: “Ready”, “Imagick extension not installed”, “PDF blocked by ImageMagick policy” or “PDF support missing”. When a policy is the cause, the file’s path is shown too. |
| CMYK PDF Rendering | The result of actually rendering a CMYK test page. Some ImageMagick 6 builds turn CMYK PDFs white. |
| Page Selection | Whether choosing a page works, from rendering a two-page test PDF. |
| Ghostscript | Details such as the Ghostscript device ImageMagick uses for CMYK PDFs, read from delegates.xml. |
| Color Management | Whether CMYK and sRGB ICC profiles were found. Without them the conversion falls back to arithmetic, which looks more vivid. |
Results are remembered for twelve hours. After your host changes something, click Check this server again.
Statistics at the bottom shows “Total PDFs”, “With thumbnail” and “Without thumbnail”; Refresh Statistics counts again.
If the last thumbnail could not be made, the reason is shown here with when it happened. It clears itself the next time a thumbnail is generated successfully.
05The Settings tab

Image Settings
| Setting | What it does | Default |
|---|---|---|
| Max Width | Maximum width of the generated thumbnail (100–4096). | 1024 |
| Max Height | Maximum height of the generated thumbnail (100–4096). | 1024 |
| Rendering Resolution | Resolution the PDF page is rendered at (72–600 DPI). | 150 |
| Quality | Image quality for JPEG / WebP output (10–100). | 90 |
| Output Format | JPEG / PNG / WebP. | JPEG |
| Background Color | Background for transparent areas: White / Black / Transparent (PNG only). | White |
| Page Number | The page to use. 0 is the first page (1 for page two). Applies site-wide. | 0 |
Behavior Settings
| Setting | What it does | Default |
|---|---|---|
| Auto Generate | Generate a thumbnail when a PDF is uploaded. When it is off, the preview WordPress draws of every PDF at upload (…-pdf.jpg) is also deleted from the PDF’s folder. | On |
| Featured Image | Set the generated thumbnail as the PDF’s featured image, so get_post_thumbnail_id() works on PDF attachments. | On |
Display Settings
| Setting | What it does | Default |
|---|---|---|
| Display Thumbnail Icon | Show the generated thumbnail instead of the generic PDF icon in the Media Library. | On |
| Hide Generated Images | Keep generated thumbnail images out of the Media Library list. When unchecked, deleting a PDF does not delete its generated image. | On |
| Keep Images on Uninstall | Keep generated images, as ordinary images, after the plugin is removed. | Off |
Insert Settings
What gets output when a PDF is inserted from the post editor.
| Setting | What it does | Default |
|---|---|---|
| Default Insert Type | Thumbnail Image / Title (text link only) / Custom HTML. | Thumbnail Image |
| Default Insert Size | Image size used for the inserted thumbnail. | medium |
| Link To | PDF File / Attachment Page / None (no link). | PDF File |
| Custom HTML Template | The HTML used when the insert type is Custom HTML. Takes the placeholders below. | — |
| Placeholder | Replaced with |
|---|---|
%PDF_URL% | URL of the PDF file |
%THUMBNAIL_URL% | URL of the thumbnail image |
%TITLE% | The PDF’s title |
%ID% | The PDF’s attachment ID |
%ATTACHMENT_URL% | URL of the attachment page |
<a href="%PDF_URL%" target="_blank">
<img src="%THUMBNAIL_URL%" alt="%TITLE%">
</a> The output goes through wp_kses_post(), so anything not allowed in post content is stripped.
06Bulk Generate
For PDFs uploaded before the plugin was installed, or thumbnails you want to remake after changing settings.

- To remake existing thumbnails, tick Include PDFs that already have thumbnails (regenerate).
- Click Scan for PDFs. “Scan Results” shows how many were found.
- Click Start Generation. “Progress” counts Generated and Failed; “Log” lists each result.
- Click Stop to stop part way.
When nothing is found, the screen says why (no PDFs in the library, or every PDF already has a thumbnail). In the second case it offers a button to scan again including them.
07Media Library
- Covers: in grid and list view, the generated thumbnail replaces the PDF icon (when Display Thumbnail Icon is on).
- Edit Media screen: a PDF with a generated thumbnail shows that thumbnail in the Edit Media preview too (since 1.4.3).
- PDFs in image pickers: a PDF with a thumbnail is offered in WordPress’s own image pickers only: the Image, Gallery and Post Featured Image blocks, the block editor’s featured image, and the classic editor’s “Set featured image” and the featured image view of “Add Media”. It is not offered in other plugins’ pickers, or in core pickers such as Cover and Media & Text. Returning true from the filter
rapls_pdf_image_creator_pdfs_in_every_image_pickeroffers PDFs in every picker that asks for images, as up to 1.4.20. A PDF dropped or pasted into the block editor becomes a File block, not an Image block; to show a PDF as an image, choose it in the Image block’s Media Library tab. - “PDF Thumbnail” column: the list view gets a column showing whether each PDF has a thumbnail (✓ / ✗).
- Row links: hover a PDF’s row for Generate Thumbnail (when it has none) or Regenerate Thumbnail, to remake just that one.

Generated files
Uploading my-document.pdf produces files like these (sizes depend on your theme):
my-document-pdf.jpg full size
my-document-pdf-1024x768.jpg large
my-document-pdf-300x225.jpg medium
my-document-pdf-150x150.jpg thumbnail A regenerated thumbnail gets a different filename from the one before, because with the same URL browsers keep showing the old image.
08Inserting into posts
When you choose a PDF through “Add Media” in the post editor and insert it, the output follows Insert Settings.
When you want finer control over where the thumbnail goes in a post, the shortcodes in the next section work too.
09Shortcodes
id is the PDF’s attachment ID — the number after item= or post= in the URL when you open the PDF in the Media Library. Since 1.4.45 the shortcodes take a PDF’s ID only. To bring back 1.4.20’s behaviour, where any post’s ID could be given, return true from the filter rapls_pdf_image_creator_shortcode_any_post; it is still shown only to a reader who may see that post.
| Shortcode | Output | Attributes (default) |
|---|---|---|
[rapls_pdf_thumbnail id="123"] | The thumbnail image | size (thumbnail), class |
[rapls_pdf_thumbnail_url id="123"] | The thumbnail URL | size (thumbnail) |
[rapls_pdf_clickable_thumbnail id="123"] | A thumbnail linked to the PDF | size (thumbnail), class, target (_blank) |
[rapls_pdf_download_link id="123"] | A download link with a thumbnail | show_thumbnail (true), size (thumbnail), text, class (rapls-pic-download-link) |
[rapls_pdf_clickable_thumbnail id="123" size="medium"]
[rapls_pdf_download_link id="123" text="Download the brochure" show_thumbnail="false"] 10Template functions
| Function | Returns |
|---|---|
rapls_pic_get_thumbnail_url( $pdf_id, $size ) | The thumbnail URL, or null |
rapls_pic_get_thumbnail_id( $pdf_id ) | The thumbnail’s attachment ID, or null |
rapls_pic_get_thumbnail_image( $pdf_id, $size, $attr ) | The thumbnail’s <img> HTML |
rapls_pic_has_thumbnail( $pdf_id ) | Whether it has a thumbnail (true / false) |
rapls_pic_generate_thumbnail( $pdf_id, $force ) | Generates a thumbnail and returns its ID; $force true remakes it |
$pdf_id = 123;
if ( rapls_pic_has_thumbnail( $pdf_id ) ) {
echo rapls_pic_get_thumbnail_image( $pdf_id, 'medium' );
} Listing every PDF attached to a post:
$pdfs = get_posts( array(
'post_type' => 'attachment',
'post_mime_type' => 'application/pdf',
'post_parent' => get_the_ID(),
'posts_per_page' => -1,
) );
foreach ( $pdfs as $pdf ) {
if ( rapls_pic_has_thumbnail( $pdf->ID ) ) {
printf(
'<a href="%s">%s</a>',
esc_url( wp_get_attachment_url( $pdf->ID ) ),
rapls_pic_get_thumbnail_image( $pdf->ID, 'thumbnail' )
);
}
} 11When no thumbnail appears
Start with Tools → Site Health, “PDF thumbnail generation”, or the Status tab. Who to ask, and what to ask for, depends on the cause.
The server can’t read PDFs
| Shown as | Ask your host to |
|---|---|
| Imagick extension not installed | Install and enable the PHP Imagick extension. |
| PDF blocked by ImageMagick policy | Give the PDF coder read rights in policy.xml. Many hosts have denied PDFs since a 2018 Ghostscript vulnerability. The Status tab shows the file’s path. |
| PDF support missing | Enable PDF support (the delegate) in ImageMagick, and confirm policy.xml doesn’t deny the PDF coder. |
Only this PDF fails
| Shown as | What to do |
|---|---|
| The page rendered as a blank white image. | See “Blank thumbnails” below. |
| The page was too large for ImageMagick to open. | Lower the resolution on the Settings tab and generate again. Large-format pages at a high DPI can run to hundreds of millions of pixels. |
| The image could not be written to the uploads folder. | Check the permissions on wp-content/uploads, and that the disk isn’t full. |
| The PDF file is missing from the uploads folder. | The attachment exists but its file doesn’t. Re-upload the PDF. |
| ImageMagick could not render the page. | Read the exact message shown. If it mentions gs, the failure is with this file rather than the server as a whole. |
Blank thumbnails
Since 1.4.0 a page that is one flat colour is not saved: the PDF keeps its icon and the Status tab says why. There are two usual causes.
- An old Ghostscript (9.27 or earlier): it fails on an image inside a transparency group and returns a white page without an error — typically with PowerPoint and Illustrator exports. Since 1.4.1 the page is read once more with an instruction to switch transparency off (
GS_OPTIONS) placed in the environment for that one read. A page that already rendered is never touched. The lasting fix is for your host to update Ghostscript. - Some ImageMagick 6 builds with CMYK PDFs: some builds take CMYK PDFs from Ghostscript in a format (
bmpsep8) ImageMagick itself can’t decode. The plugin can’t work around it. Ask your host to upgrade to ImageMagick 7, or to change theps:cmykdelegate indelegates.xmlfrombmpsep8topamcmyk32. RGB PDFs are unaffected, so suspect this when only some PDFs come out white.
Colours too vivid
Without a CMYK ICC profile on the server, conversion falls back to arithmetic that exaggerates greens and blues. Check “Color Management” on the Status tab. Installing a CMYK profile on the server, or pointing the rapls_pdf_image_creator_icc_paths filter at one, restores accurate colour.
Thumbnails made before an update keep their old colours; regenerate them with Bulk Generate. To keep the previous colours instead:
add_filter( 'rapls_pdf_image_creator_color_conversion', function() {
return 'naive';
} ); 12Filters and actions
| Hook | Purpose |
|---|---|
rapls_pdf_image_creator_thumbnail_page | Page to use (0-indexed); the PDF’s ID is the second argument |
rapls_pdf_image_creator_thumbnail_max_width / _max_height | Maximum width and height |
rapls_pdf_image_creator_thumbnail_resolution | Rendering resolution (DPI) |
rapls_pdf_image_creator_thumbnail_quality | Image quality (1–100) |
rapls_pdf_image_creator_thumbnail_format | Output format |
rapls_pdf_image_creator_thumbnail_bgcolor | Background colour |
rapls_pdf_image_creator_thumbnail_image_attributes | Image tag attributes |
rapls_pdf_image_creator_custom_insert_html | Custom HTML output |
rapls_pdf_image_creator_pdfs_in_every_image_picker | Return true to offer PDFs with a thumbnail in every image picker (default false) |
rapls_pdf_image_creator_shortcode_any_post | Return true to let the shortcodes take any post’s ID, not only a PDF’s (default false) |
rapls_pdf_image_creator_show_upsell | Return false to remove every mention of the add-on |
rapls_pdf_image_creator_hide_thumbnails_in_library | Whether generated images are hidden in the Media Library |
rapls_pdf_image_creator_color_conversion | auto (default) / icc / naive |
rapls_pdf_image_creator_icc_paths | Paths searched for ICC profiles, per type (srgb / cmyk) |
rapls_pdf_image_creator_rendering_intent | Rendering intent (default: relative colorimetric) |
rapls_pdf_image_creator_flatten_background | Background that transparency is flattened onto |
rapls_pdf_image_creator_policy_paths / _delegate_paths | Where diagnostics look for policy.xml / delegates.xml |
rapls_pdf_image_creator_refuse_blank_page | Return false to save blank pages too (for PDFs whose first page really is blank) |
rapls_pdf_image_creator_ghostscript_options | Change the options used for the blank-page retry, or turn the retry off |
rapls_pdf_image_creator_show_review_prompt | Return false to never show the review request |
rapls_pdf_image_creator_before_resize | The rendered, flattened page before resizing (for developers) |
rapls_pdf_image_creator_before_generate / _after_generate (actions) | Before and after generation |
rapls_pdf_image_creator_generation_failed (action) | On failure; a failure code is the third argument, the engine result the fourth |
Using page two as the cover (the Page Number setting does the same):
add_filter( 'rapls_pdf_image_creator_thumbnail_page', function( $page, $pdf_id ) {
return 1; // 0-indexed, so page two
}, 10, 2 ); 13Uninstalling
Deleting the plugin removes its settings and the thumbnail images it generated. To keep the images, turn on Display Settings → Keep Images on Uninstall before deleting; they stay in the Media Library as ordinary images. Your PDF files themselves are never deleted.
14FAQ
Can I use a page other than the first?
Yes. Set the site-wide page in Page Number on the Settings tab (0 is the first page). The “Page Selection” row on the Status tab shows whether choosing a page works on your server.
I updated and the thumbnails still have the old colours.
Updates don’t regenerate thumbnails. Run Bulk Generate with “Include PDFs that already have thumbnails (regenerate)” ticked.
I regenerated, but the screen still shows the old image.
Since 1.4.1 a regenerated image gets a new filename, so browser caches don’t get in the way. For images made before that, clear your browser cache and look again.
Only the Edit Media screen shows a blank white preview.
That is how 1.4.2 and earlier behaved. WordPress draws its own preview of every PDF at upload, without this plugin’s workaround for pages that come back white, and the Edit Media screen showed that preview. Since 1.4.3 a PDF with a generated thumbnail shows the thumbnail there instead. Updating the plugin fixes it; the thumbnails do not need regenerating.
Does it run commands on the server?
No. PDFs are drawn by ImageMagick through the Imagick extension, and the plugin starts no processes. The blank-page retry only places an environment variable for the length of one read.
15About the add-on
There is a paid add-on for this free plugin, Rapls PDF Image Creator Pro. It adds a page choice and crop per PDF, detection of replaced PDFs with a screen for replacing them, and a queue that keeps going after you close the tab. The free plugin behaves the same whether it is installed or not. The plugin mentions the add-on in five places only: its row on the Plugins screen, a card at the bottom of the Settings tab, the Status tab, and once under the page-number field after you change it. Returning false from the filter rapls_pdf_image_creator_show_upsell removes all of them.
exec and proc_open not disabled) and Ghostscript must be installed. On a server missing either, the add-on cannot render either. See the Add-on manual for how to use it. Product page | 日本語版 | Add-on manual | WordPress.org | Support forum
© 2026 Rapls Works
