Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

PDF to ImageField

Security covered Under active development 790 sites

Part of the PDF ecosystem · 19 projects

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

Ask your assistant about PDF to ImageField

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Oct 2023
Latest release
5 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.1-rc2 Pre-release 10–11 May 23, 2026
1.0.1-rc1 Pre-release 10–11 Apr 30, 2026
1.0.1-beta1 Pre-release 9–10 PHP >=7.4.0 Nov 13, 2023
1.0.1-alpha1 Pre-release 9–10 PHP >=7.4.0 Oct 21, 2023
1.0.x-dev Dev 10–11 PHP ^8.3 Oct 21, 2023