Hi @All,
we have a requirement . we have approx 15,000 pages and for all the pages i need to generate thumbnails
(page properties -> thumbnails -> generate -> save & close)
Is there is any automated way to do this ?
Thanks and regards
Saurabh Kumar
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @lone_Ranger Currently Adobe uses PageThumbnail.js(/libs/cq/gui/components/common/wcm/clientlibs/wcm/js/pagethumbnail.js) for the thumbnail generation. Please check the method function generate() that is used for thumbnail generation.
You can use this function to generate the page thumbnails and loop it for all the pages. Please note that this generate only file.sftmp on the jcr that is used to hold temporary assets data in JCR.
Do you want to apply some specific image as thumbnail ? If yes, you can write custom script for this.
No i want to generate different Thumbnails for all pages.
Template thumbnail is already there i want to generate different thumbnails for all page.
Hi,
Not sure if it can be done from backend as there is no API(I am not aware of any)
But the logic is at client side - http://localhost:4502/libs/cq/gui/components/common/wcm/clientlibs/wcm.js
function generate(component) { var activator = component.find(".cq-wcm-pagethumbnail-activator").prop("disabled", true); wait(component); var path = component.data("cqWcmPagethumbnailPath"); var isTemplate = component.data("isTemplate") || false; var dest = isTemplate ? "thumbnail.png.sftmp" : "file.sftmp"; var pgen = new CQ.Siteadmin.PagePreview(); pgen.generatePreview(path, dest, isTemplate, function(data) { // use attr() instead of prop() for action, so that no domain is appended if(isTemplate) { setValue(component, "./thumbnail.png@MoveFrom", component.closest("form").attr("action") + "/" + dest); } else { setValue(component, "./image/file@MoveFrom", component.closest("form").attr("action") + "/image/" + dest); } clearWait(component, data); activator.prop("disabled", false); }); }
Hi @lone_Ranger Currently Adobe uses PageThumbnail.js(/libs/cq/gui/components/common/wcm/clientlibs/wcm/js/pagethumbnail.js) for the thumbnail generation. Please check the method function generate() that is used for thumbnail generation.
You can use this function to generate the page thumbnails and loop it for all the pages. Please note that this generate only file.sftmp on the jcr that is used to hold temporary assets data in JCR.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies