markshust / docker-magento

Mark Shust's Docker Configuration for Magento
https://m.academy/courses/set-up-magento-2-development-environment-docker/
MIT License
2.54k stars 997 forks source link

sample data Product Image not show in frontend and adminpanel #1052

Closed sunflower-tc closed 7 months ago

sunflower-tc commented 8 months ago

Description bin/magento sampledata:deploy && bin/magento setup:upgrade

Steps To Reproduce Product images are not displayed in the front-end and back-end administration, there is no media/catalog/product folder image

Expected Result Front and back-end product images are displayed properly

Actual Result

YevhenZvieriev commented 8 months ago

Hi, @sunflower-tc

You can solve this follow:

rm -rf pub/media/catalog/product/cache/*
bin/magento catalog:images:resize
bin/magento setup:static-content:deploy
bin/magento setup:upgrade
markshust commented 7 months ago

I'm unable to replicate this issue.

Note that running:

bin/magento sampledata:deploy && bin/magento setup:upgrade

Is different from running:

bin/magento sampledata:deploy
bin/magento setup:upgrade

This is because the local bin/magento script which pipes commands through the container is different from the bin/magento script within the container. I'd recommend running both lines separately and see if it fixes this. But since I'm unable to replicate this on a new install, I'll be closing this ticket out.