I cannot upload product images on Magento 2 in Xampp. When I try to upload the product image, it gives me an error. Please see the following image:

enter image description here

I have also tried it again but the same error appeared.

Please help me to resolve this issue.

Looking forward to your reply.

  • Have you tried executed commands like reindex,upgrade, content,cache – aravind May 16 '19 at 13:36
  • @aravind, I have tried all the commands but still not able to upload the images. – Siva May 17 '19 at 5:30

I agree with other answer here that it is file permission issue. M2 on windows in xampp isn't great for this reason. I recommend docker. That said there is a post here regarding xampp permissions that might help.



Except permission issues this error also can show up when you use different version of PHP. Probably you cannot run Magento 2.2.6 with PHP 7.2 without patches (if they exist)

Please check on first place what version of PHP you have on Your Xampp server.

This may be helpful: https://community.magento.com/t5/Installing-Magento-2-x/What-is-the-optimal-version-of-PHP-to-Run-2-2-6/td-p/111598

UPDATE: I didn't notice that You have also issue with logo, its looks like this bug(Magento 2.3), check maybe with logo first, if its working try change this also for products: https://github.com/magento/magento2/commit/ba69bfec127bed8c39c7d9e7b73d10b54449b158

  • Thanks for your suggestion. For your information, I have checked the same on Magento 2.3.0 in Xampp. There also I can't upload the images. Checked the devdocs and see Magento 2.3.0 supports PHP version 7.2. What should I do now? – Siva May 21 '19 at 5:55
  • Users ownership on directories, is it correct? – BartZalas May 21 '19 at 7:55
  • What do you mean by ownership on directories? For your info, I have already set the permission 777 to the pub/media folder – Siva May 21 '19 at 11:49
  • So permissions should be allright. What about this magento.stackexchange.com/questions/258965/… It looks like you have also problem with logo, I didnt notice. I update my answer. – BartZalas May 21 '19 at 21:39
  • I have tried the link which you provided but it's not working as expected. – Siva May 22 '19 at 6:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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