I have created products in magento site. Now I want to load product images from external url.. how I will do this?
1 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:
- Save all your urls to file (for example urls.txt)
- Create folder media/import and copy urls.txt to this folder
- 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:
- Create custom attribute (for example custom_image) with input type text and put external link to this attribute.
- 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() ?>" />
-
when I run the command
wget -i urls.txt
getting an error like-bash: wget: command not found
– SruthiCommented Jun 27, 2016 at 10:58 -
You need to install wget. Run cat /etc/*-release and tell me you OS Commented Jun 27, 2016 at 11:00
-
-
1Is there any way to load images directly from external url, instead of importing images in to the server– SruthiCommented Jun 27, 2016 at 11:05
-