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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

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

Resize images uploaded to assets automatically

Go to End

3 Posts   1670 Views


Community Member, 19 Posts

25 December 2008 at 1:52am

Edited: 25/12/2008 1:58am

Let's say you have a shared webhosting package with 100MB of diskspace. If a client would upload just 25 pictures taken with a digital camera (3MB on average), you've ran almost out of diskspace.

Is it possible to have images uploaded to assets to be resized automatically to let's say 800px x 600px and thus a much smaller filesize?


Community Member, 470 Posts

25 December 2008 at 5:59am

You'd have to do some hacking to the code. SS does resize the images, but always keeps an original in tact for future use.


Community Member, 400 Posts

28 December 2008 at 5:35am

Yes you can do this, al you have to do it to customize your CMS to which well suites your needs.

The silverstripe's GD class provides a lot of methods, read through this