I installed Magento 2 on a new fresh installed VPS, running Debian 8. Magento is installed and I can seem to be working OK, but I cannot see any images on the front end and when I look in the catalog.
I'm running Apache 2.4, PHP 5.6 and MySQL 5.6
I installed Magento 2 on a new fresh installed VPS, running Debian 8. Magento is installed and I can seem to be working OK, but I cannot see any images on the front end and when I look in the catalog.
I'm running Apache 2.4, PHP 5.6 and MySQL 5.6
Your Static Contents are most likely out of date. You can regenerate your static contents with this command on your server from your Magento 2 root folder. Note that you may or may not need to delete files from pub/static/frontend
php bin/magento setup:static-content:deploy <locale>
Try to run these commands on the root of the project:
php bin/magento cache:flush
php bin/magento cache:clean
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
chmod 777 -R .
Yes, it will happen if you use the Windows platform instead of Linux.
Because in Magento 2 recent release, they have introduced the Symlink option (Like shortcut of an existing file) to copy from code directory to pub directory.
Unfortunately, the Windows platform needs special permission to create symlink files. So you need to stop your server and your command prompt terminal then we need to start the server and terminal with the administrator access.
Then simply delete "adminhtml" and "frontend" folders from "pub/static" directory. Then do setup upgrade using
php bin\magento setup:upgrade
Flush the cache once using
php bin\magento cache:flush
I hope the problem is resolved now. If it works kindly give me Thumbs up.
You may want to try: php bin/magento catalog:images:resize
If you are using Watermarks for your images, also ensure that the Watermark Image(s) are in place by checking pub/media/catalog/products/watermark/default/
Sometimes, running the catalog:images:resize will ensure the images are in place. If/when using watermarks, if they've been accidentally removed, it breaks regenerating products.
Please check pub/media/.htaccess
this file is exit or not, if not in the folder you need to undo it. if you have git please run this commend:
git checkout pub/media/.htaccess
It's works for me.