Magento 1.9 – How to Set Product Images from External URL

externalmagento-1.9product-imagesurl

I have created products in magento site. Now I want to load product images from external url.. how I will do this?

Best Answer

You need to build a module, because Magento not support external images "out the box". As advice, you need to download images localy and after import.

As fast and simple one time solution use wget and load from file. For example:

  1. Save all your urls to file (for example urls.txt)
  2. Create folder media/import and copy urls.txt to this folder
  3. Go to this folder and run the command
wget -i urls.txt

Wget download all your files to the folder and you can import them from local source.

If you need to run this process periodically, you definitely need to build a module or find free solution

If you want to show images directly from remote url, do the following:

  1. Create custom attribute (for example custom_image) with input type text and put external link to this attribute.
  2. Update your theme template (find template, where your images displayed and change <img src="<?php echo $_product->getSmallImage() ?>" /> to <img src="<?php echo $_product->getCustomImage() ?>" />