PDF Thumbnail Generator

PDF Thumbnail Generator

Wordpress plugin

Install on Wordpress

App Details

Generates thumbnail for PDF file automatically after file is uploaded to the Media library.

You can also generate thumbnails for old PDF files that are already in the Media library – you can generate missing thumbnails or regenerate all thumbnails.

Imagick library must be installed on your server, otherwise this plugin will not work

  • automated test after plugin activation to make sure it will work on your server
  • works with all types of WordPress installations: domain, subdomain, subdirectory, multisite/network
  • works on Apache and NGiNX
  • automatically generate thumbnail for new uploaded PDFs
  • (re)generate thumbnails for existing PDFs in Media library
  • set maximum width of PDF thumbnail
  • set maximum height of PDF thumbnail
  • set image quality of PDF thumbnail
  • set image file type of PDF thumbnail

Shortcodes

pdf_thumbnail

Maybe you want to display PDF thumbnail by using a shortcode

[pdf_thumbnail id="123"] 

pdf_thumbnail_url

Maybe you want to display PDF thumbnail url by using a shortcode

[pdf_thumbnail_url id="123"] 

Functions

get_pdf_thumbnail_url

If you want to return PDF thumbnail URL you can use

get_pdf_thumbnail_url( $pdf_id ) 

it works similar to wp_get_attachment_url and it will return something like

https://site.com/wp-content/uploads/2022/01/example.pdf.png 

get_pdf_thumbnail_path

If you want to return PDF thumbnail URL you can use

get_pdf_thumbnail_path( $pdf_id ) 

it works similar to get_attached_file and it will return something like

/www/site.com/wp-content/uploads/2022/01/example.pdf.png 

get_pdf_thumbnail_image_src

If you want to return PDF thumbnail url, width and height you can use

get_pdf_thumbnail_image_src( $pdf_id ) 

it works similar to wp_get_attachment_image_src and it will return something like

[ 0 => 'https://site.com/wp-content/uploads/2022/01/example.pdf.png', 1 => 600, 2 => 800 ] 

get_pdf_thumbnail_image

If you want to return PDF thumbnail image tag you can use

get_pdf_thumbnail_image( $pdf_id ) 

it works similar to wp_get_attachment_image and it will return something like

<img src="https://site.com/wp-content/uploads/2022/01/example.pdf.png" width="600" height="800" alt="example" loading="lazy"> 

Hooks

pdf_thumbnail_max_width

Maybe you want to change global PDF thumbnail max_width for a specific PDF file

add_filter( 'pdf_thumbnail_max_width', function( $max_width, $pdf_id ){ if( $pdf_id == 123 ){ return 1024; } return $max_width; }, 10, 2 ); 

pdf_thumbnail_max_height

Maybe you want to change global PDF thumbnail max_width for a specific PDF file

add_filter( 'pdf_thumbnail_max_height', function( $max_height, $pdf_id ){ if( $pdf_id == 123 ){ return 768; } return $max_height; }, 10, 2 ); 

pdf_thumbnail_quality

Maybe you want to change global PDF thumbnail quality for a specific PDF file

add_filter( 'pdf_thumbnail_quality', function( $quality, $pdf_id ){ if( $pdf_id == 123 ){ return 100; } return $quality; }, 10, 2 ); 

pdf_thumbnail_type

Maybe you want to change global PDF thumbnail file type for a specific PDF file

add_filter( 'pdf_thumbnail_type', function( $type, $pdf_id ){ if( $pdf_id == 123 ){ return 'png'; // or 'jpg' } return $type; }, 10, 2 ); 

pdf_thumbnail_bgcolor

Maybe you want to change default PDF thumbnail background for a specific PDF file

add_filter( 'pdf_thumbnail_bgcolor', function( $bgcolor, $pdf_id ){ if( $pdf_id == 123 ){ return 'black'; // default is 'white' } return $bgcolor; }, 10, 2 ); 

pdf_thumbnail_page_number

Maybe you want to PDF thumbnail page number for a specific PDF file

add_filter( 'pdf_thumbnail_page_number', function( $page, $pdf_id ){ if( $pdf_id == 123 ){ return 1; // default is 0 } return $page; }, 10, 2 ); 

pdf_thumbnail_filename

Maybe you want to PDF thumbnail filename for a specific PDF file

add_filter( 'pdf_thumbnail_filename', function( $filename, $pdf_id ){ if( $pdf_id == 123 ){ return str_replace( '.pdf.png', '.png', $filename ); } return $filename; }, 10, 2 ); 

pdf_thumbnail_imagick

Maybe you want to add watermark to PDF thumbnail for a specific PDF file

add_filter( 'pdf_thumbnail_imagick', function( $imagick, $pdf_id ){ if( $pdf_id == 123 ){ // add your watermark here } return $imagick; }, 10, 2 ); 

get_pdf_thumbnail_image_attributes

Maybe you want to change attributes for image tag from get_pdf_thumbnail_image function

add_filter( 'get_pdf_thumbnail_image_attributes', function( $attr, $pdf_id ){ $attr['loading'] = 'eager'; return $attr; }, 10, 2 ); 

pdf_thumbnail_generated

Maybe you want to do something after the thumbnail is generated

add_action( 'pdf_thumbnail_generated', function( $thumbnail_path, $pdf_id ){ // do somthing with the local file $thumbnail_path }, 10, 2 ); 

Pricing

Starting from $0 per month.

Check Out the Scroll to Element Button Widget

By Common Ninja

Scroll to Element ButtonTry For Free!

App Info

Rating

Reviewers

3 reviews

Tags

creator
generator
image
pdf
thumbnail

Developed By

kubiq

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Forms

Forms plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Comments

Comments plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Maps

Maps plugins for Wordpress

Security

Security plugins for Wordpress

Translation

Translation plugins for Wordpress

Ads

Ads plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Chat

Chat plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Membership

Membership plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Contact

Contact plugins for Wordpress

Comments

Comments plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

Scroll to Element Button for Wordpress logo

Scroll to Element Button

Scroll to element button that improves navigation by letting visitors jump directly to key sections, reducing friction and boosting overall engagement.

Flip Card Builder for Wordpress logo

Flip Card Builder

Add interactive two-sided cards with flip effects to present front and back content in a compact, engaging format.

Social Proof Avatars for Wordpress logo

Social Proof Avatars

Display social proof avatars that show user activity and ratings, build trust instantly, and help visitors feel confident about your credibility.

Tumblr Feed for Wordpress logo

Tumblr Feed

Show Tumblr posts with a Tumblr feed that keeps content fresh, improves navigation, and helps visitors discover more posts.

Scroll Progress for Wordpress logo

Scroll Progress

Use a scroll progress bar that visually tracks reading on the page, improves navigation, and keeps visitors aware of their position.

Scroll to Top for Wordpress logo

Scroll to Top

A scroll to top button that helps visitors move back to the top of long pages quickly, improving navigation and overall browsing flow.

Image Grid Slider for Wordpress logo

Image Grid Slider

Showcase visuals with an image grid slider that blends a grid layout and carousel motion to create a dynamic, customizable, mobile friendly display.

Trust Badges for Wordpress logo

Trust Badges

Show trust badges that highlight security and reliability, build customer confidence, and help visitors feel safe making purchases on your site.

Team Member Flip Cards for Wordpress logo

Team Member Flip Cards

Show your team with interactive team member flip cards that build trust, support transparency, and help visitors connect with the people behind your brand.

Social Media Links for Wordpress logo

Social Media Links

Use social media links with sticky buttons that keep your profiles visible, boost engagement, and help promote your content more effectively across your site.

Card Carousel for Wordpress logo

Card Carousel

Showcase content with a card carousel that combines images and text, improves visual design, and helps visitors explore key information.

Sitejabber Reviews for Wordpress logo

Sitejabber Reviews

Show Sitejabber reviews to build trust, strengthen credibility, and help visitors make confident purchase decisions that support higher sales.

More plugins

plugins You Might Like

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms