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.

Customising the CMS /

Resize images uploaded to assets automatically


Reply


3 Posts   1119 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
[url]http://doc.silverstripe.com/doku.php?id=gd[/url]