So the user creates a news item adds a summary and uploads the summary image and populates the news using the rich text editor.
I have a list of all the news items user has created on the right handside of the page.
I want to be able to show a thumbnail image of the image the user uploads to the summary image property in a list of all news items.
whats the best way of doing this. I'm sure I've read somewhere that theres a thumbnail of the image available but I'm not sure how to retreive it.
The alternate way I suppose would be to get the summary image and resixe it using ImageGen. But I would like to know how to do it using the thumbnail property.
As I know the upload field scans if the uploaded file is an image and then gegerates an thumbnail from it with "_thumb" inserted before the file extension. eg: I have uploaded a pic named test.jpg then I have in the same folder a file named test_thumb.jpg.
To get the url of the thumb you can use the replace function of the umbraco.library, like this:
Umbraco 4.5: thumbnail for news list
hi everyone,
I have a news item with 3 properties :
summary field as textstring multiple
Summary Image as media picker.
bodyText as richtexteditor
So the user creates a news item adds a summary and uploads the summary image and populates the news using the rich text editor.
I have a list of all the news items user has created on the right handside of the page.
I want to be able to show a thumbnail image of the image the user uploads to the summary image property in a list of all news items.
whats the best way of doing this. I'm sure I've read somewhere that theres a thumbnail of the image available but I'm not sure how to retreive it.
The alternate way I suppose would be to get the summary image and resixe it using ImageGen. But I would like to know how to do it using the thumbnail property.
>>sajid
As I know the upload field scans if the uploaded file is an image and then gegerates an thumbnail from it with "_thumb" inserted before the file extension. eg: I have uploaded a pic named test.jpg then I have in the same folder a file named test_thumb.jpg.
To get the url of the thumb you can use the replace function of the umbraco.library, like this:
Snippet
or in the new schema
umbraco.library.Replace(./YourUploadFieldAlias, '.jpg', '_thumb.jpg')
hth, Thomas
Thomas, thank you for you solution above.
This is my XSLT for anyone else:
<img>
<xsl:attribute name="src">
<xsl:value-of select="umbraco.library:Replace(umbraco.library:GetMedia(./newsImage, 0)/umbracoFile, '.jpg', '_thumb.jpg')" /></xsl:attribute>
</img>
is working on a reply...