1

When I am installing some extension in Magento 2 using PHP bin/magento then after doing that then my site has a problem which is the all the images including product and everything appears to be missing. This problem doesn't happen before. So I started uninstalling the extension in the hope that it will return back to normal. unfortunately, it didn't

so are there any advice on how to restore all my missing images back in Magento 2? I install the image using sample data.

Update: Below is the screenshot of the error using F12.

Why is all the image nonexistent after I do an upgrade?

enter image description here

any help would be appreciated

2
  • Have you run the php bin/magento setup:upgrade command after install the extension? Apr 26, 2017 at 6:02
  • yes I did it numerous times. but how come all the images is not loading? this what bugs me the most. Apr 26, 2017 at 8:19

4 Answers 4

1

Run these commands on the root of your Magento install to fix many commons problems (like yours) related to folder permissions, deployed files, cache and etc:

alias mage="php -d memory_limit=-1 -f bin/magento"

chmod -R 775 pub/static/ var/ pub/media/ &&
rm -rf var/view_preprocessed/ var/cache/ var/page_cache/ var/tmp/ var/generation/ pub/static/frontend/ ;
composer install && composer update -vv;
php -r "opcache_reset();"
mage cache:flush &
mage indexer:reindex &
mage setup:upgrade &&
mage setup:static-content:deploy;
mage setup:db-data:upgrade &&
mage dev:source-theme:deploy &&
chmod -R 775 pub/static/ pub/media/ var/
2
  • yes, your method works very well. thanks. Apr 26, 2017 at 14:38
  • 1
    wow, that's work! you save my day May 5, 2019 at 14:19
1

This issue is similar with this issue after upgrading to Magento 2.1.6. I have solved this issue by firing bin/magento catalog:images:resize command via console/terminal.

4
  • I already did that but the image is still missing. do you have any other solution? Apr 26, 2017 at 8:18
  • Can you give screenshot of your web console log while loading the page? Just press F12 if you use Chrome. Apr 26, 2017 at 8:24
  • there I had added the screenshot. and it seems to be error404notfound. Apr 26, 2017 at 14:19
  • Very long process (~30 mins) and didn't help
    – zhartaunik
    May 26, 2017 at 7:16
1

I had the same problem that my images were missing after security upgrade from 2.2.2 to 2.2.3.

My problem was, that after shop upgrade my .htaccess was set back in original and it has the option "Option ExecCGI". If you remove this option from the .htaccess in /magento/pub/ it may can help, that magento can load the images in /pub/media/ again.

Greets Loqic

0

In version 2.2.4, I had to remove the "Option ExecCGI" line from the .htaccess located here: /pub/media/

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.