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:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

is there a way to optimize image file size on upload..

Go to End

4 Posts   1197 Views


Community Member, 135 Posts

19 August 2011 at 1:38am

I am using imagegallery module.

an admin user who does not know much about image manipulation uploaded a load of HUGE images that broke CMS and main site. I know that i can increase memory in _config.php but I just wondered if there was a way to optimize these images on upload to avoid this problem. I dont think there is.... but just in case.

Otherwise I guess I will have to teach them how to use photshop :)


Forum Moderator, 4102 Posts

20 August 2011 at 12:49am

You would use the onAfterUpload() hook for that. Unfortunately, Uploadify doesn't trigger that hook, but I will add in that change today, because it should do so.

Silverstripe tips, tutorials, screencasts, and more.


Community Member, 135 Posts

20 August 2011 at 2:18am

Hey Unclecheese.

that is great. I will definately utilize this once done... much appreciated and should help the editors of the site i built a lot.

I don't suppose you could let me know when you have done this? Otherwise I will check out Uploadify over the next week or so.

Top man!


Community Member, 130 Posts

29 November 2011 at 6:00am

Hi Guys,
Have you been able to come up with a solution for this?

I basically have the same issue. I'd like to just upload images that are over 5mbs but automatically reduce the filesize to 3mbs.

Is there a way to do that?