Is it possible, with Magento 2 to move product images and downloadables files (attached to downloadable products type, and sold) to another server and keep things still working ?

I'm not talking about AWS or other similar clouds but just a regular linux filesystem on another server.

Anyone already achieved this ?


2 Answers 2


Yes both are certainly possible with Magento 2, where you host your static assets like images and downloadable files on a different server (or even from a different domain from the same server).

You need to change Base URL for the user media files to your external domain

as well as need to change your CORS policy in your web server.

Check these SE threads below to get you in a right direction

Is it possible to serve images from Magento 2 using a URL reference?

Magento Store product image another domain?

How to manage Downloadable Product storage location in Magento


Change media image directory path

  • I will get a try with the last link you provide : seems simple :) ln -s media/catalog/product/ /mnt/my/huge/fileserver/location thanks for the research !
    – ffab
    Jan 26, 2021 at 7:00

You may need to regenerate your images cache as the new server may not generate the right links to the images (you'll see immediately when you browse your shop as there won't be any product images). In that case delete the cache and run the following command:

php bin/magento catalog:image:resize

Note this can take a long time!

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.