I'm trying to migrate a local project to the server and when trying to get the images in pub / media / catalog / product they just don't appear. Where does magento physically store images? i tried to search but all i found were images from sample-data. Where are the physical images of the products? and without using the magento csv tool.
1 Answer
pub/media/catalog/product
The images are stored in subfolders based on the name of the image. salt.jpg would be in pub/media/catalog/product/s/a/salt.jpg. If they didn't get migrated you may need to do the following:
- cd root_folder/pub (on the old server)
- tar -cvf media.tar media/*
- move the media.tar file to the root_folder/pub (on the new server)
- tar --skip-old-files -xvf media.tar
- php bin/magento catalog:images:resize
-
I follow the path of the images, but they are simply not there, all I find are images from the sample data. Do you know how I can solve this? Commented Jan 23, 2021 at 16:20
-
cd root folder/pub (on the old server) tar -cvf media.tar media/* move the media.tar file to the pub directory on the new server tar --skip-old-files -xvf media.tar php bin/magento catalog:images:resize Commented Jan 24, 2021 at 1:40