Image Upload Size #2296

Closed
tsarma opened this Issue Nov 29, 2011 · 6 comments

2 participants

@tsarma

In Contao there is no way to limit the uploaded Image size (By size, I mean image dimensions width / height). I think this would be a nice feature.

Related issues: #2321

--- Originally created on July 14th, 2010, at 09:49am (ID 2296)

@leofeyer
Contao member

I wonder what "maximum image width" and "maximum image height" are for then :)

--- Originally created on July 14th, 2010, at 11:35am

@tsarma

Sorry what I mean here is to limit the size of image being uploaded.

I wonder what "maximum image width" and "maximum image height" are for then :)

I know these are the sizes to which the uploaded Image is scaled.

--- Originally created on July 14th, 2010, at 11:46am

@leofeyer
Contao member

This is the same feature though. At first, Contao refused images that exceeded the maximum image dimensions, however this behavious was changed in one of the recent minor releases (search the ticket system if you want to learn more) to automatically scale them down instead.

--- Originally created on July 14th, 2010, at 11:51am

@tsarma

This is the same feature though.

I fail to it as same feature. I knew of those changes in recent releases according to tickets #922 and #1582

But then feature I am requesting is something additional. Let me explain it more detail:
In Contao workflow there should be four image sizes depending on condition. Lets put it so:

A = Max. frontend size
B = Max. Size image is scaled to in BE filesystem
C = Original image size (say from camera)
D = Max. Allowed size.

One can define A, B in settings and C is allready there for every Image. But D, you have defined as 3000px hard coded in DC_Folder.php, controller.php and FileTree.php. If the image being uploaded is bigger than 3000px, system says

Image xzy.jpg uploaded successfully, however it is too big to be resized automatically.

Now this image can never be resized in the Frontend to limit A or per input width and height you give. I think there should be setting in the BE to define D, so that we can block such big images appearing out of layout in the FE.

--- Originally created on July 14th, 2010, at 01:42pm

@leofeyer
Contao member

I think there should be setting in the BE to define D

There is a feature request already.

--- Originally created on July 14th, 2010, at 02:12pm

@leofeyer
Contao member

--- Originally closed on July 14th, 2010, at 11:35am

@leofeyer leofeyer closed this Nov 29, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment