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:
- If you execute the groovy script as is, it will display the documents that don't have thumbnails, but it won't regenerate anything.
- To trigger the thumbnail generation you have to change the script third line regenerateMissingEntries to true and execute the script again.
- 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