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.

Archive /

Our old forums are still available as a read-only archive.

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

Automatically Resizing Images


Go to End


2 Posts   1748 Views

Avatar
Bandit

Community Member, 10 Posts

7 December 2007 at 9:56am

Howdy

I'm using the latest Silverstripe release for a website of mine (2.2.3 RC2 or something) and wish to have all images that are put in or uploaded to a page resized to 200px wide.

How do I go about doing this?

Cheers

James

Avatar
Tim

Community Member, 201 Posts

7 December 2007 at 3:49pm

If your attaching the files to a page, you can resize them in your templates by using $Image.SetWidth(200), of you may want to use the Gallery module if your needing to resize images which are in your assets (files and images) directory.