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

Setting maximum dimensions for Image


Go to End


2 Posts   886 Views

Avatar
zard

Community Member, 25 Posts

19 November 2012 at 7:28am

Hi,

I've got a simple object holding image as one of its relations via has_one, the contents are handled by UploadField.

Is there any way to prevent upload of large-dimension images, ie a width filter? I would like to prevent running out of the memory when creating thumbnails.

Thanks!

Avatar
martimiz

Forum Moderator, 1391 Posts

19 November 2012 at 7:59am

No, at the moment there is no way to restrict pixel-dimensions, only MB's. Just recently we had a discussion on the core/dev group, a couple of suggestions were made but no final solution yet. I guess we should pick this up again, or at least create a ticket.

Discussion here, if you're interested
https://groups.google.com/forum/m/?fromgroups#!topic/silverstripe-dev/B57a3KYeAVQ