asset-share-commons icon indicating copy to clipboard operation
asset-share-commons copied to clipboard

Get static thumbnail on asset share commons details page.

Open amanmishra17 opened this issue 2 years ago • 2 comments

Hi Team, We have a use case where we need to show the static thumbnail on Asset Share Commons details page of an asset. These static thumbnails are added manually in the AEM author for those particular assets, which are of type zip, html, etc.

Any input to achieve this would be appreciated.

Thanks.

amanmishra17 avatar Feb 14 '23 18:02 amanmishra17

I think the easiest way would be to create a new preview component that renders the image base don the asset type, and just add that to the details page. This should be rather easy to make, especially if your logic is hardcode-able (and not author-able).

Initially i thought you could use placeholders, but that would mean the asset's primary image rendition [2] should have to resolve to null -- which i guess you could do by making a Asset Rendition name [1] that resolves to something that doesnt exist, so the placeholder image is used [2] - but that's kinda hacky. You would also need to make details pages [3] for each "asset type" that needs a different thumbnail, so you can set the placeholder for that type (and this assumes the OOTB AEM asset type mapping is of sufficient granularity to support this). ... Like i said, this way is rather hacky.

[1] https://opensource.adobe.com/asset-share-commons/pages/development/asset-renditions/ [2] https://opensource.adobe.com/asset-share-commons/pages/details/image/ [3] https://opensource.adobe.com/asset-share-commons/pages/details/details-page/

davidjgonzalez avatar Feb 14 '23 20:02 davidjgonzalez

Thanks David. I'll check and try these inputs.

amanmishra17 avatar Feb 17 '23 08:02 amanmishra17