The thumbnails forge project was started quite a while ago (like Alfresco 0.9 or so… old school) and the first public release was put on the forge in late 2006 (which would have been around Alfresco 1.3 I guess).
The project gained the attention of the Alfresco team and they contacted me about making a few changes to bring it more inline with what they had in mind for an implementation, notably creating a public thumbnail service. Those changes were made and I continued to collaborate with Alfresco on the forge project and gave input on their implementation.
Here’s a look at some of the differences to be aware of between the old thumbnails project implementation and Alfresco’s new native thumbnails:
Pre 1.0 Versions of Forge Project
Alfresco 3 Native
The service responsible for generating and retrieving thumbnails
The generateThumbnails method would create thumbnails for
all ThumbnailSpecifications defined.
A specific thumbnail can be generated with overriding options
(possibly defined by a user in the web interface) which
are merged with the defaults of the ThumbnailSpecification
(useful in defining the offset for a video thumbnail for example).
The createThumbnail and updateThumbnail
methods are given the specific TransformationOptions to
use in generating the thumbnail.
The content property from which the source data will be read
must be specified when generating the thumbnail, the default cm:content
will not be assumed.
A common size and destination mimetype for thumbnails
ContentTransformers and corresponging command line options explicitly
defined in config
ContentTransformer determined by ContentService
from the given TransformationOptions
The detailed resizing specifications
The specific ContentTransformer to use and the necessary
command line options are defined
The resizing details are specified using classes containing generic
definitions (for example ImageResizeOptions used by
the ImageTransformationOptions class) which are then
translated to appropriate command line code by the ContentTransformer
found by the ContentService
The model type
Not being of type content prevents most rules from being run on
thumbnail nodes lest we do something unnecessary and resource intensive
like extract metadata or even create another thumbnail of a thumbnail node
and prevents thumbnail nodes from being indexed or returned in a search.
Care must be taken to not run rules or index thumbnail nodes since they
One suggestion has been to add the following to the thumbnail type:
<title>Ignore Inherited Rules</title>
The model property name of the common size and mimetype destination definition
The specifiationName was the name of the ThumbnailSpecification used to generate the thumbnail.
The new CreateThumbnailActionExecuter uses the user-chosen thumbnailName to retrieve the ThumbnailDefinition but the relationship between the ThumbnailDefinition and its thumbnailName is
not enforced by the ThumbnailService.
Default thumbnail sizes (max length/width)
Strikethroughs represent deprecated items.
Avatar thumbnail size has nothing to do with what I can only assume is an incredibly overhyped movie about pissed off blue tree people since I haven’t been to a theater in like 10 years.
This information has been available in the thumbnails project’s 1.0 release readme but as it’s not shown by default I figured I’d post here as well.
Architect and Principal Software Engineer for Platform Services at Alfresco.
Builder of cloud-native, enterprise products. Technical leader of distributed teams.
Father, husband, musician, wannabe chef and brewer.
View all posts by rgauss
One thought on “Alfresco 3 Thumbnails and the Forge Project”