Increase Image Upload File Size Limit on OpenCart

OpenCart’s default image upload size is 300KB and that is simply too small for clients that don’t have the knowledge to resize their images before uploading them. Although uploading digital camera images does use more bandwidth, sometimes it can not be avoided. To adjust the image upload size make the following changes around line 436 of admin/controller/common/filemanager.php:

if ($this->request->files['image']['size'] > 3000000) {
	$json['error'] = $this->language->get('error_file_size');

In this case we have increased the upload size limit to 10MB, also make sure that your php configuration will allow file uploads and posts of this size.

What is the default Maximum file upload size and how to change it?

By default Maximum file upload size is 128MB.

php_value upload_max_filesize 128M
php_value post_max_size 128M

If you want to change the default Maximum file upload size from 128MB to 1GB, then it can be done by changing in the these files..

1.) In .htaccess file (Apache + mod_php) add the following two lines to a .htaccess in the installed directory:

php_value upload_max_filesize 1G
php_value post_max_size 1G

2.) In php.ini file, which is located in the php folder (like C:/xampp/php/php.ini)

upload_max_filesize = 1G
post_max_size = 1G

After modifying the global php.ini you will need to restart the webserver to have changes take effect.