21286 Posts in 5733 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1145 Views |
-
upload image as thumbnail

13 June 2009 at 4:24am
I need to add an option on the silverstripe pages to upload an image thumbnail that is set to a preset size, is there anyway of doing this?
-
Re: upload image as thumbnail

13 June 2009 at 9:14am
Does it need to be saved as a certain size or just displayed as a certain size after it has been uploaded?
-
Re: upload image as thumbnail

13 June 2009 at 10:31am
When using SilverStripe you usually upload an image in its original format and then define in the template what size it should have. The resized version of the image (in other words: thumbnail) will automatically be created and cached for you.
If you want to make sure, that the users only upload images of a given size, you could probably achieve that by subclassing the ImageUpload field or create custom validators. But as mentioned previously, this procedure isn't really necessary for most use-cases. -
Re: upload image as thumbnail

13 June 2009 at 9:04pm
Thanks for the reply's, yes, the thumbnails need to be a certain size to fit the template without being shrunk so they distort. The users do not really understand how to make the images smaller so would be good if on the page they edit there was a browse button and then they click and upload an image for that page. I need to access the image upload and edit tools but from within the page screen so the image can be edited easily.
-
Re: upload image as thumbnail

14 June 2009 at 1:32am
This tutorial will be useful for you :
http://doc.silverstripe.com/doku.php?id=imageupload
| 1145 Views | ||
|
Page:
1
|
Go to Top |


