Magento – Magento Store product image another domain

imageimage-upload

How to store the product images in another domain?
for example, My site is www.mytestsite.com. We need to store the product image in subdomain as "media.mytestsite.com".
Is it Possible?

We also try to change the media url in backend. But image not uploading. It say as "Unable to create directory 'media.mytestsite.com/media/tmp/catalog/product'. "

Best Answer

It sounds like you are trying to write your media to another server rather than just serve them from a different domain. This isn't possible through configuration in magento. Even if you could you would need the media on the magento server as magento checks on its local filesystem to see if a file exists before serving it to the browser, you would end up with a page of placeholder images.

What you could do to achieve what you are after is use an external disk which is shared via nfs and mounted on both your magento and media servers. That way your media is written locally from magento but available on your second server through the shared drive.

That said, I'm not sure your requirements but a CDN solution may be a better option for you.

Related Topic