Magento – Magento2 Symlink from pub/pub folder

magento2symlinks

I have /pub as document root (as recommended) and this always seems to get me into trouble.

Some extensions use https://www.example.com/pub/media/catalog/product/… as URL to images for example. This is acually the real path to the image files, but the working URL should be: https://www.example.com/media/catalog/product/

So could I create a symlink /pub/pub that points to /pub to solve this?

Best Answer

I found the solution, so I'm answering this. No need to create symlinks, just change these settings.

Base URL for User Media Files: {{unsecure_base_url}}media/

Secure Base URL for User Media Files: {{secure_base_url}}media/

More information about this: https://github.com/magento/magento2/issues/9111

Related Topic