I am using Magento 2.3 I am unable to upload image static block. It will show insert file instead of image.

enter image description here

I don't know what is the problem here

  • Is there anything in the magento log files?
    – hey
    Mar 24, 2019 at 20:23
  • Can you confirm that PHP has write permission onmedia folder Mar 25, 2019 at 5:01
  • @MurtuzaZabuawala I don't think it's file permission Problem because Image uploader needs to be show instead of file uploader
    – Magento 2
    Mar 25, 2019 at 13:11
  • @where I don't see any log on this
    – Magento 2
    Mar 25, 2019 at 13:12
  • @Magento2 you have checked default in luma theme working ? Mar 27, 2019 at 8:27

3 Answers 3


If you're using apache watch the logs for your website. You should be able to find the file at /var/log/apache2/<log file> or /var/log/httpd/<log file>. Then in your terminal run the following command to watch for anything that is written to the file in real-time: tail -f <path to log file>.

If you get nothing from that next try your php logs. Those should also be located somewhere within the /var/log directory.

If you get any output about an error, please post it here so we can help you debug this.

  • I don't see any log on this
    – Magento 2
    Mar 27, 2019 at 5:27
  • I try with fresh theme there also same problem File validation failed.
    – Magento 2
    Mar 27, 2019 at 5:27
  • well are you using apache2 or nginx? Mar 29, 2019 at 13:57

Try below Solution

Go to your-project-root\vendor\magento\framework\File\Uploader.php

And Find line no 552

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

Replace With below line

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

Than Reindex and flush cache.

  • No it's not working still same only
    – Magento 2
    Mar 28, 2019 at 20:26

There was a known bug where a file uploader was being used instead of an image uploader for parts of the backend in the 2.3.0 release. It was fixed in 2.3.1, so if you aren't already running that version an update might resolve it.

If you can't upgrade immediately, the bug is detailed in Issue 19549 along with the fix - look for the comment by SoCal. Essentially, you'd need to manually edit 4 or 5 files so the javscript uses the correct form element.

Otherwise, if that doesn't work is there any output to the Javascript console? That might help narrow down the problem.

(That specific error wording implies an error generated in the javascript and logged out by the error handling defined in the bootstrap.js file. Unfortunately the code in the bootstrap file itself doesn't know anything about the actual cause or location of the error, so any other logged issues might help.)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.