If you need more flexibility in your creation of thumbnails (various sizes, cropping, borders, etc. etc.) you might find ImageGen helpful. http://our.umbraco.org/projects/imagegen. Full docs as well.
There are also a number of packages for galleries that can save you time.
Using media thumbnail in XSLT
Hi
Is it possible to access to auto-generated image thumbnail through the GetMedia function. Maybe through an umbracoThumbnail alias ??
[code]
<xsl:variable name="media" select="umbraco.library:GetMedia(data[@alias='pImage'], 'false')/data" />
<xsl:if test="$media">
<xsl:variable name="url" select="$media [@alias = 'umbracoFile']" />
<xsl:variable name="width" select="$media [@alias = 'umbracoWidth']" />
<xsl:variable name="height" select="$media [@alias = 'umbracoHeight']" />
<xsl:variable name="altText" select="@nodeName" />
<a href="{umbraco.library:NiceUrl(@id)}" title="Læs mere ...">
<img src="{$url}" width="120px" height="90px" alt="{$altText}" />
</a>
</xsl:if>
[/code]
Kind regard,
/Anders
Hi
In this way, I have solved it in my gallery.
<xsl:variable name="galImage" select="umbraco.library:GetMedia($picFile,0)/data[@alias='umbracoFile']"/>
<xsl:variable name="extension" select="umbraco.library:GetMedia($picFile,0)/data[@alias='umbracoExtension']"/>
...
<img src="{concat(substring-before($galImage, concat('.',$extension)), concat('_thumb.',$extension))}" alt="{@nodeName}"/>
If you need more flexibility in your creation of thumbnails (various sizes, cropping, borders, etc. etc.) you might find ImageGen helpful. http://our.umbraco.org/projects/imagegen. Full docs as well.
There are also a number of packages for galleries that can save you time.
cheers,
doug.
is working on a reply...