Solved: Uncaught ReferenceError: Base64 is not Defined in Magento 2.3

Ever faced an error in Magento 2.3 that says :

“Uncaught ReferenceError: Base64 is not defined.”

You might have faced this error while uploading images from admin in Magento 2.3.

If you’re looking for the solution of Uncaught ReferenceError: Base64 is not Defined in Magento 2.3 that means, you have solved the error Count(): Parameter must be an array or an Object That Implements Countable in Magento 2.3 and then landed on this error!

Happened the same with me! Hence, I have posted the solution for the same here:

Solution for Uncaught ReferenceError: Base64 is not defined in Magento 2.3

Replace the code of Uploader.php at vendor/magento/framework/File/

if (is_array($file) && count($file) > 0 && count($file[0]) > 0 && count($file[1]) > 0) {

with the below code

if (is_array($file) && count($file) > 0 && !empty($file[0]) && (isset($file[1]) && !empty($file[1]))) {

Solved!

Similar solution:

Feel free to share the solution with Magento community via social media.

Thank you.

Table of Contents