Search code examples
opencartopencart-3

How to change image upload size in Opencart 3


I'm looking for a way to increase image upload size in Opencart 3 from 300kb to 3mb

I tried to change oc_store/controller/setting/setting.php the 571 line in GH-repo from 300 000 to 3 000 000 to achieve approximate 3mb size.

$data['config_file_max_size'] = 300000;

Also I found a solution applicable to Opencart 2 only


Solution

  • In OpenCart 3 there is built in tool to change upload image size and there is no need to change the code:

    Go to Admin -> System -> Settings -> Server -> Max File Size

    One more tip: To change preview image size from 300x300 - go to:

    admin -> Extension -> Extension -> Choose the extension type: Theme -> Product Image Thumb Size