Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

upload image as thumbnail

Go to End

6 Posts   1599 Views


Community Member, 12 Posts

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?


Community Member, 215 Posts

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?


Community Member, 904 Posts

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.


Community Member, 12 Posts

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.


Community Member, 14 Posts

14 June 2009 at 1:32am

This tutorial will be useful for you :


Community Member, 12 Posts

15 June 2009 at 10:26pm

Cheers that was what I was looking for