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:
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,cachearavind– aravind2019年05月16日 13:36:11 +00:00Commented May 16, 2019 at 13:36
-
@aravind, I have tried all the commands but still not able to upload the images.Siva– Siva2019年05月17日 05:30:41 +00:00Commented May 17, 2019 at 5:30
2 Answers 2
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.
https://stackoverflow.com/questions/9349469/changing-php-write-permissions-in-xampp-on-windows-7
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– Siva2019年05月21日 05:55:16 +00:00Commented May 21, 2019 at 5:55
-
Users ownership on directories, is it correct?BartZalas– BartZalas2019年05月21日 07:55:52 +00:00Commented May 21, 2019 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 folderSiva– Siva2019年05月21日 11:49:45 +00:00Commented May 21, 2019 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– BartZalas2019年05月21日 21:39:46 +00:00Commented May 21, 2019 at 21:39
-
I have tried the link which you provided but it's not working as expected.Siva– Siva2019年05月22日 06:55:05 +00:00Commented May 22, 2019 at 6:55
Explore related questions
See similar questions with these tags.