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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

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


Reply


4 Posts   735 Views

Avatar
zim

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 :)

Avatar
UncleCheese

Forum Moderator, 4094 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. http://www.leftandmain.com

Avatar
zim

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!

Avatar
ambient

Community Member, 123 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?

Thanks