AnsweredAssumed Answered

Current method for adding a rendition definition for the thumbnail service?

Question asked by oofdachile on Oct 30, 2013
Latest reply on Nov 7, 2013 by arnoldschrijver
Hi, folks –

  I would like to add an ImageMagick thumbnail rendition definition for use by the 4.2e Community thumbnail service.  Jeff wrote a <a href="" target="_blank">thorough article</a> on the subject (thanks, Jeff!).  He observed that adding a new thumbnail rendition definition in a slick fashion takes some work.

The out-of-the-box thumbnails are registered in the thumbnail-service-context.xml file. I don’t see a clean way to extend that without repeating the definitions, so in my example, I wrote a bean that calls the Thumbnail Registry and registers the custom thumbnail definitions provided in the Spring context file

… and later in the comments to his post, Umut Utkan observed that one could call the Thumbnail Registry's methods without writing Java code.

Instead of creating a custom bean to register your custom thumbnail definitions, you could have just used MethodInvokingFactory bean to register them directly to the default thumbnailRegistry bean.

… and he provides a substantial bean-within-a-bean approach.  Being the lazy sort, I tried Umut's technique by placing his code in a *-context.xml file in my alfresco/extensions folder & restarting, but calling a script containing …

document.createThumbnail("scImageThumbnail", true);

… from a space-rule didn't produce this rendition, even overnight, though the standard renditions were created successfully this way.  This probably means that I did something wrong.

Jeff's article was written a while ago (2009).  How would you add a new rendition definition to the 4.2e thumbnail service today?  Have you gotten the MethodInvokingFactory to work for adding renditions or for other Alfresco-related purposes?

Thanks for your time.