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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

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

Resize images uploaded to assets automatically


Go to End


3 Posts   2191 Views

Avatar
Bert

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?

Avatar
Liam

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.

Avatar
Nivanka

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
http://doc.silverstripe.com/doku.php?id=gd