6

I've created a content type called "Products" wich has the following fields:

code (Product's id)
Title (Product's name)
Description
Image (Product's picture - image field)

I've imported a list of products from a CSV file using Feeds module. So far everything is ok. Except for the pictures.

Then I have a lot of pictures (3000+) that I need to do a bulk import into each product's image field.
The picture's files are named product_code.jpg, e.g.: 001.jpg being the image of the product 001, 002.jpg for the product 002... and so on.

I've searched for modules that could do this kind of import, but have found none.
I took a look at the database and I'm thinking about uploading the files to the server via FTP and alter the tables by hand, since the filenames = product's code.

What's the best method for me to do this kind of import? Is there any module I am missing?

Thanks!

1 Answer 1

4

Why don't you make a new csv field for the images with a relative path to each image as the row value? Then when you import the nodes using Feeds, the image field will automatically have a link the the image

4
  • Tks glumbo! Your solution worked! I thought the Feeds module won't upload the pictures this way. I had to use the full path instead of relative path, but it worked like a charm! :) Jul 18, 2011 at 18:07
  • Great. If you have any feed questions you can ask me because I work with it a lot Jul 18, 2011 at 22:04
  • This didn't work for me. I have a csv-field for the relative image path, but after import the field for the image-field is empty... do i need to format the csv-field in a specific way?
    – Volker
    Nov 15, 2012 at 16:30
  • @Volker: you need to prefix the CSV field with a URL scheme. drupal.org/node/638804#importing-images
    – Sam Wilson
    Oct 29, 2014 at 23:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.