Magento2 is looking directly in the root folder for media and static files. It is not looking in pub/media folder. Product images are not showing in the front. I installed Magento 2 in a subdirectory and with the installation.
I imported the products with Storemanager Emagicone, images were in import file (in root/media and pub/media because i did not know which to use),
Product images are in the front referring to a wrong path:
/media/catalog/product/cache/1/small_image/400x533/beff4985b56e3afdbeabfc89641a4582/y/o/yorkshire
When I look in FTP, the images are in pub/media/catalog/product. The above-mentioned directory is totally empty.
Moving the files from root/pub/media to root/media solved partially the problem. All basic images show up, but product images are not showing at all.
I already tried:php bin/magento setup:di:compile
and php bin/magento setup:static-content:deploy
and php bin/magento cache:clean
and php bin/magento indexer:reindex
The file permissions and user owner are OK, also i deleted all from ROOT > pub > static > EXCEPT .HTACCESS
. I also deleted folder in: pub/static
var/cache, var/view_preprocessed/css/frontend/ , ..source/frontend
I also looked in di.xml
Magento\Framework\App\View\Asset\MaterializationStrategy\Copy
No symlinks!
Best Answer
For individual product, try saving the product in admin without any change.
For all products, try running the following command (this will take some time to complete):