Legacy Knowledge Base
Published Sep. 10, 2025

How can I manually force the generation of document thumbnails?

Written By

Jorge Diaz

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • It is necessary to regenerate all thumbnails of the documents in documents and media.
  • After executing "Reset preview and thumbnail file for Documents and Media" in the server administration section, the thumbnails are deleted, but they are not regenerated until the thumbnail is requested by a final user
  • How can I manually force the generation of document thumbnails?

Environment

  • DXP 7.3

Resolution

The product, out of the box, doesn't provide the functionality to trigger the generation of missing thumbnails.

As a workaround, you can use the attached RegenThumbnails.groovy script and execute it from the script tab of the server administration section.

Script usage:

  1. If you execute the groovy script as is, it will display the documents that don't have thumbnails, but it won't regenerate anything.
  2. To trigger the thumbnail generation you have to change the script third line  regenerateMissingEntries to true and execute the script again.
  3. IMPORTANT: If you execute the script several times with regenerateMissingEntries=true, it could queue several generation operations for each document, so it is better to execute it only once.

If you want to filter the documents that are processed by the groovy script, you can change the SQL of the ninth line.

Additional Information

 

 

Did this article resolve your issue ?

Legacy Knowledge Base