Jump to content

Edit History

pishkus

pishkus

Looks like this is a known bug and it still has not been fixed even 4 years after being reported:

https://github.com/PrestaShop/PrestaShop/issues/15183

If anyone else is having same problem even on P.S. 8.1, and if you are OK with modifying core files, open file src\Adapter\Image\ProductImageFileValidator.php and comment out the following lines:

        if ($maxUploadSizeBytes->isGreaterThanZero() && $size->isGreaterThan($maxUploadSizeBytes)) {
            throw UploadedImageSizeException::build((int) (string) $maxUploadSizeBytes);
        }

This should allow you to upload files larger than 2MB (provided that you have php settings like upload_max_filesize larger than 2MB)

pishkus

pishkus

Looks like this is a known bug and it still has not been fixed even 4 years after being reported:

https://github.com/PrestaShop/PrestaShop/issues/15183

If anyone else is having same problem event on P.S. 8.1, and if you are OK with modifying core files, open file src\Adapter\Image\ProductImageFileValidator.php and comment out the following lines:

        if ($maxUploadSizeBytes->isGreaterThanZero() && $size->isGreaterThan($maxUploadSizeBytes)) {
            throw UploadedImageSizeException::build((int) (string) $maxUploadSizeBytes);
        }

This should allow you to upload files larger than 2MB (provided that you have php settings like upload_max_filesize larger than 2MB)

×
×
  • Create New...