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
- $this->addFieldMapping('field_image', 'file_name');
- $this->addFieldMapping('field_image:source_dir')->defaultValue('http://www.browse-tutorials.com/');Programming Language: PHP