7 March 2014

There is a module called migrate that enables you to migrate content to Drupal. This snippet shows you how to migrate image from URL to Drupal 7. You have to get file name from the importing source and add the right url as source directory.

Source code viewer
  1. $this->addFieldMapping('field_image', 'file_name');
  2. $this->addFieldMapping('field_image:source_dir')->defaultValue('http://www.browse-tutorials.com/');
Programming Language: PHP