Drupal is a registered trademark of Dries Buytaert
File Entity (fieldable files) 8.x-2.7 Minor update available for module file_entity (8.x-2.7). Field Group 4.1.0-alpha4 New alpha version released for module field_group (4.1.0-alpha4). CKEditor 5 Plugin Pack 1.5.4 Minor update available for module ckeditor5_plugin_pack (1.5.4). CKEditor 5 Premium Features 1.8.3 Minor update available for module ckeditor5_premium_features (1.8.3). Varbase Editor 10.1.6 Minor update available for module varbase_editor (10.1.6). MCP Sentinel 2.0.0 Major update available for module mcp_sentinel (2.0.0). xNavigation 1.2.4 Minor update available for module xnavigation (1.2.4). Emulsify 7.2.0 Minor update available for theme emulsify (7.2.0). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs. Configuration development 8.x-1.12 Module config_devel updated after 8 months of inactivity (8.x-1.12).

This module automatically converts uploaded PDF files into images, allowing you to create preview thumbnails of the first page or generate a gallery of images from every page. Generated images are stored in a separate image field linked to the uploaded PDF.

The PDF To ImageField module provides automatic conversion of uploaded PDF files to images.
It can be used either to create a snapshot of the front page to use as a preview thumbnail, or to generate a gallery of images from each page in the document.

The module is implemented as an additional widget for File Field where PDFs are uploaded to. It places generated images into a Image Field on the same content type.

Requirements:

  • PHP version >= 8.3
  • Recommended Drupal version >= 10.3

Installation (1.0.x)

Just composer install and configure the file widget.

Configuration

  • First, add an imagefield on your chosen content type. This is where the generated images wil be stored.
  • Set the allowed fields to 1 if you just want a cover page, or 'unlimited' if you want all pages to be generated.
  • Next add a filefield to your chosen content type and choose 'PDF to Image' as the widget.
    • D10/D11 - This filefield should be configured to accept PDF file types (required) + you can add the same extensions as for the target field.
  • When configuring this field, you will be required to link the uploaded file field with the target image field.
  • You can add image style handling to the imagefield rendering as normal to adjust the size of the results and how they display on the page.

Processing

Processing of PDF may take some time.
Larger documents use the 'batch' process to generate each page.

Comparison:

  • PDF Preview now offers similar functionality. It only does the first page, and operates as a 'formatter' for the uploaded file rather than treating the generated image as an attached file.
  • See also PDF Preview Image to prepare a preview image from PDF

Activity

Total releases
2
First release
Apr 2026
Latest release
2 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.1-rc2 Pre-release May 23, 2026
1.0.1-rc1 Pre-release Apr 30, 2026