This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Suggestions » Image filesize restriction

Image filesize restriction

Image filesize restriction

Thursday 21 July 2005 11:19:44 am - 6 replies

Currently, it seems that you can't restrict the filesize of images to less than one megabyte. When having thousands of users, having everyone upload a 1MB image isn't feasible. It would be good if this could be set to lower values.

Another argument for this: the loading time and bandwidth requirements of the forum if everyone has a 1MB avatar.

Monday 01 August 2005 1:13:52 pm

YES! I definately second this request. My next project is a Classified Ads site where people will be uploading images of the objects they wish to sell. Could take up a lot of space if everybody uploads a 1MB file.

It would be nice if the size of the images can be restricted in steps of 50k.

Can anybody knowlegable please comment?

Thanks for a great Opensource Project! happy.gif Emoticon

Friday 05 August 2005 4:38:41 pm


Sorry to bump, but I think this would be a valuable addition to the functionality of eZpublish.

Could save a lot of disk space on the server.

eZ systems, is this maybe planned for any upcoming releases or as a hack/extension etc?

If not, any suggestions on where to look so I can attempt to hack it myself?


Friday 05 August 2005 5:05:36 pm

You can't limit the uploaded file to less than 1Mb, however, you can shrink it to whatever dimension you want, so effectively limit the size too.

That solve the pb for the download of your avatars for your forums.

If you want to save space on the server, you can also replace the uploaded file by a size reduced one by changing some parameters on the image.ini.append.php, as opposed to generate an additionnal variation. We had a thread about it a while ago in the forum.

Beware that it works better with imagemagic than with GD (I had pb with gif files if I remember right).


Wednesday 17 August 2005 12:51:18 pm

Thanks for the suggestions Xavier.

It's just that it makes more sense to have the limit to be set in "kb" in stead of "MB". Then it is easy to limit it on a more granular level.

Does anybody have any idea how to hack it so that the limit is based on kb rather than MB?


Tuesday 23 August 2005 6:24:15 pm

Easiest way is setting the upload limit in a .htaccess file bypassing the ez publish config.

100K limit:

php_value upload_max_filesize 102400


LimitRequestBody 102400

Only problem is that it's a limit for all uploads and not for a certain class or user. So an ez publish config. option would still be nice.

Modified on Tuesday 23 August 2005 6:30:49 pm by bisk

Wednesday 24 August 2005 4:37:44 pm

Thanks for the suggestion Bisk. As you mention, it will be nice if it is configurable to not limit all uploads, but only specific ones.


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from