0

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 1

1

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:

  1. cd root_folder/pub (on the old server)
  2. tar -cvf media.tar media/*
  3. move the media.tar file to the root_folder/pub (on the new server)
  4. tar --skip-old-files -xvf media.tar
  5. php bin/magento catalog:images:resize
2
  • 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?
    – lucas1231
    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
    – Ron Sayers
    Commented Jan 24, 2021 at 1:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.