cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 - Error when uploading image

Magento 2 - Error when uploading image

I'm trying to change the logo of my Magento store so I go to Content > Design > Configuration, I click Edit on the Default Store View, I scroll down to Other Settings and open Header... I already have a logo there so I click on the trash icon to remove it, then I click on Upload and select the new logo I want from my computer. The logo loads properly, but when I click on Save Configuration, I get the following error message: 

 

"Something is wrong with the file upload settings."
 
error-msg.PNG
 
Also I remove the Favicon Icon and I was able to save the configurations with no error, but the icon still appears in the front end even though the Admin shows that there is no icon. 
2 REPLIES 2

Re: Magento 2 - Error when uploading image

Hello abimaelmon9889,

 

There are various possible reasons that Magento 2 images are not uploading or not showing on the Admin. However, you can try to follow the below ways to fix the error when uploading an image on Magento 2.

 

Run Re-index Magento Data:

 

After the import, you might find that uploaded images are not visible at the Admin. It is because some image upload needs to be re-index for the changes to be applied.

Naivgate to System Index management Select all > Actions Update from the save.

 

Clear the Cache from Cache Management:

 

You must try to clear your Magento cache and your browser cache,

  • Firstly, log in to your Magento Admin.
  • Then, navigate to System Cache management Flush Magento cache

 

Check image roles are assigned to get visible on Admin:

 

You can check the assigned roles from the Admin via the below path.

Open Product Information Image Details.

Lastly, check "Hide from Product Page" option is not selected. 

 

If the Favicon icon is not showing on the Admin side, you can try to modify the below file path,

/vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml

Then, locate and replace below code snippet:

 

From:
<field name="header_logo_src" formElement="fileUploader">
To:
<field name="header_logo_src" formElement="imageUploader">
From:
<field name="head_shortcut_icon" formElement="fileUploader">
To:
<field name="head_shortcut_icon" formElement="imageUploader">

Check PHP memory limit:

 

Insufficient PHP memory limit can also cause errors during image upload. You must try updating the limit to some larger value and re-import the image.

 

Re-deploy static content:

 

If using any custom modules, then connect the server via SSH.

Then, go to the Magento root directory and run the following command,

 

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento indexer:reindex
php bin/magento cache:clean

I hope the above ways can help you to fix the error when uploading image on Magento 2. However, If the icon is still not showing on the Admin, you can update it here.

 

-------------------------------

Regards,

Rex M

 

VPS Hosting | Magento Hosting

Re: Magento 2 - Error when uploading image

Hello @rexaccuweb03d6 thank you for your response. Unfortunately, I tried everything you said and I still can't upload images. 

 

I have no issues with uploading images to products by the way, it's only in Content > Design > Configuration where I get that error.