Increase image size limit of 1000px


Does anyone know how to increase the image file upload limit of 1000px in size? I have already increased the file size limit to greater than 300kb, but I'm not sure how to increase the actual physical dimension limit of the image. I've searched by haven't found an answer.

Oh, and my version of OpenCart is 1.5.1.



Oddly enough there's no actual limit on dimensions despite what the error says (just tested a 1200x1200 image upload successfully). Only file size is limited.

Had me baffled for 20 seconds too until I realised there was no dimension limit, I upload a vQmod for this in the Free Contr. section

Thanks guys. I must still have some file size restriction somewhere, so I'll double check that.

Is the error actually coming from filemanager?

yeh, its coming up with "Image file size too big. It must be under 300kb or smaller than 1000px x 1000px" (or something like that).

I modified the admin\controller\common\filemanager.php file to allow for larger file sizes:

Code: Select all
if ($this->request->files['image']['size'] > 1000000) {
               $json['error'] = $this->language->get('error_file_size');

I haven't checked the php.ini file yet so that could be it.

That's strange. The only thing that trips that error is file size. Did you double-check the image is under 976KB?

*slaps head*

Apologies! I was reading it as closer to 10MB, I miscounted the number of zeros! I haven't tested this, but I'm sure changing it to a larger number will work.

Thanks for your help! Sorry for wasting your time.

No worries. Everybody has those facepalm moments.

i get this too with a 500kb file, looking into fix mentioned above

ok so in my Version its line 436:

Code: Select all
            if ($this->request->files['image']['size'] > 300000) {
               $json['error'] = $this->language->get('error_file_size');

i made it ~1Mb 1000000

It is very dumb to hardcode this value. It should actually be a setting in the admin area somewhere (perhaps in Store Settings > Image)

Hehe, maintainers can be really lazy sometimes



  • New Account Creation
    QuestionWhen somone creates a new account i get this error any ideas ? Warning: mail(): Policy restriction in effect. The fifth parameter is disabled on this system in /customers/ on line 154Warning: mail(): Policy restriction in effect. The fifth parameter is disabled
  • Products behaving differently for some reason?
    QuestionHi Guys My products all have options which are setup the same...But some products, if you add one to the cart.. then add another with a different option... it adds them as 2 separate products (which is great)..However SOME products it will just increase the QTY of the one in the cart already, which I Don't want because this additional
  • Force set backend language
    QuestionAfter implementing a new payment module something happened to the backend admin pages. When I open the login page it repeats a house icon in two lines. Once I log in, the house icon shows up again in two lines horizontally from left to right. There's no menu, it's gone. Other than that the page is shown normally.What could be the reason for
  • Polish language - troubles
    QuestionI translate the script into Polish.Shows me some bushes but instead of Polish characters. Does anyone think the solution to this problem?site: ... ount/loginEncoding set to no BOOMAnswersResolved :-)UTF turn off
  • إضافة بارامتر اللغة إلى لينك المنتدى ?lang=en
    Questionمرحبا جميعاً، لدي نسخة phpbb3.0.9 و أرغب أن أكون قادرة على تغيير اللغة من خلال اللينك مباشرة مثال: فهل من الممكن القيام بذلك؟ الرجاء المساعدة.Answersلا يمكن ذلك ويمكن
  • Upload file location and access ( product options )
    QuestionHi, We use the new product options system to offer customers the option to upload an image file when they order certain products. eg. ... n-portraitWhen they upload a file and then buy a product how do we know following:a) That they have uploaded a file to go with their order and should look for it on
  • اريد اضع زرار في الاعلى مكنوب عبة منتجات وبالضغط علية يعرض
    Questionاريد اضع زرار في الاعلى مكنوب عبة منتجات وبالضغط علية يعرضجميع المنتجات هل توجد طريقة تسمح لي بفعل ذلكAnswersنعم توجد طريقة ولكن تحتاج الى تعديل برمجي ولكن ما هوا الاصدار الذي عندك من الاوبن
  • Release
    QuestionI know there is a SVN with recent changes, but I was wondering if anyone knew when would be released? Waiting on a store until the latest and greatest has been compiled into a release.Thanks
  • VQMOD issues
    QuestionHi all,I have installed VQMOD - looking to make the simplest of language file changes.Installation, auto worked fine, try it again and it states it is already installed.Maybe I am getting the xml wrong:Code: Select all<modification>   <id>header language change</id> 
  • Can't receive "Gift Voucher Email" after click "send" !
    QuestionCan't receive "Gift Voucher Email" after click "send" !May I know how to fixed this problem?AnswersDo you receive any other emails from the store ?What OC Version are you running?What Mail settings have you entered in System Settings ?I'm using OC Version 1.5.1yes, I did receive mails from the store.under my Setting>
  • cart - adding custom html field to session
    QuestionHiI have created a new field in the product table and added all the code relevant to update this field for each product.I am having a slight problem though. The checkbox is also visible on each product in the cart. The customer can either tick, or leave unchecked. Is there a way, when the checkbox is clicked, that this field is then added
  • Need some custom work done
    QuestionI need someone sufficiently skilled to pull this off..Basically I run a store which accepts PayPal payment. I want to integrate the service of this website: all the information are there. API manual included.I'm not even sure if its possible. If it is, let me know, and quote your price..
  • Use SEO URL's
    QuestionI've installed ISAPI_Rewrite3 on my server which will use the rules from .htaccess files. I renamed the .htaccess file so it is not a text file anymore and checked that it is getting read by the ISAPI filter. Everything checks out OK. I then enable the Use SEO URL's radio button in the admin and click save but the URL's are still the same
  • 1.5.x Can't Remove.
    QuestionI just upgraded and when you try and remove items from the Cart.I get a security warning, regarding even though you are on a secure website this information could be seen by a third party and then you click ok and the item is still in my cart..Any ideas..?Code: Select allalthough this page is encrypted, the information you have entered is
  • How to.... Print out a reciept instead of the invoice?
    QuestionIf you take care of orders in the Admin-section you can print out the invoice.This would be great when you send out your products to the customer and the customer pays afterwards.But if the customer do the payment directly against the store or by the bank and then i will send out the products they shouldnt get an invoice. They should get a