Usage in Media view mode

Last updated on
11 March 2023

1- In the Media entity view mode set the thumbnail field formatter to Media pdf thumbnail :

2- Set parameters as wanted :

  • Image style : the style to apply to render the image
  • Link image to : this is basically the behavior wanted when clicking on the image 
  • HTML attributes : attributes to add the img html tag
  • Field containing the pdf : select the file field of the Media entity where the PDF will be
  • Choose the page of the pdf to get the image from : the module can use any page of the pdf file for generating an image
  • Choose image format : the format of the generated image (can be jpg or png)
  • Use cron : By default, the image is generating on the fly the first time the field is displayed. When a large amount of Media is showing in a same page, generating all can take times. So when checked, that option will delay image generation by running it with cron. 

3- Clear all caches

Result :

Help improve this page

Page status: No known problems

You can: