Magento2 icon indicating copy to clipboard operation
Magento2 copied to clipboard

Ignoring pub/media/ causes images to 404

Open GLips opened this issue 5 years ago • 1 comments

On the mac branch, the docker-sync.yml explicitly ignores pub/media/*. That's causing all media files to be invisible to the apache container, and therefore they can't be served on my development site. I see that was done to prevent too many files from syncing constantly, but what's the workaround to get media images loading?

GLips avatar Aug 01 '18 04:08 GLips

I've added the following to my docker-compose.yml, which works for the time being but feels a bit wrong:

volumes:
  - elc-sync:/var/www/html:nocopy
  - ./src/pub/media:/var/www/html/pub/media # Added this to mount media as a volume without using docker-sync.
  - ~/.composer:/var/www/.composer
  - ~/.npm:/var/www/.npm

GLips avatar Aug 01 '18 18:08 GLips