I am using Magento 2.3 I am unable to upload image static block. It will show insert file instead of image.
I don't know what is the problem here
I am using Magento 2.3 I am unable to upload image static block. It will show insert file instead of image.
I don't know what is the problem here
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.
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.
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.)