Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 6
Importing Images via CSV file
 
mikeinspain
Sr. Member
 
Avatar
Total Posts:  108
Joined:  2007-10-08
Alicante, Spain
 

Hey everyone..

I know this is a popular topic, which given its popularity suggests that it needs looking at.

I have a little over 3700 products that I have successfully imported via an CSV file including all other relevant data such as categories etc…

I now wish to populate my CSV file with the relevant image/s.  Initially there is only one image for each product and 80% of the images are sharing the same filename as the sku #.

Now I hitting a brick wall trying to get these images to display on the main store.  I have uploaded images directly into the media/catalog/products folder as per the the images that have been placed on the site manually and I have uploaded the images into the media/import section.

Neither way is showing any images.  Can someone help guide in the right direction?

 
Magento Community Magento Community
Magento Community
Magento Community
 
MarkR
Jr. Member
 
Total Posts:  6
Joined:  2008-09-04
 

I managed to get it working by putting the images into the /media/import folder then putting the image name in your CSV file under the following columns - image, small_image and thumbnail in the format /myimagename.jpg (notice the forward slash). Then import the CSV file back into Magento and your images should now appear.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mikeinspain
Sr. Member
 
Avatar
Total Posts:  108
Joined:  2007-10-08
Alicante, Spain
 

Thanks I’ll have another go.

I would like to check if the url is ok in the csv file.

My main url is www.capitalhairandbeautyspain.com/store/

I’ve tried both folders; but how should the csv image url look?

/media/import/folder/filename.jpg ?
/media/import/filename.jpg

or

/store/media/import/.......
/store/media/import/folder/......

Any advice?

 
Magento Community Magento Community
Magento Community
Magento Community
 
MarkR
Jr. Member
 
Total Posts:  6
Joined:  2008-09-04
 

I would try it as /filename.jpg as the file location should be relative to the import script, once you’ve imported the CSV it moves and updates the image location itself. Try it on a couple of lines/products to test it before importing the whole file.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mikeinspain
Sr. Member
 
Avatar
Total Posts:  108
Joined:  2007-10-08
Alicante, Spain
 

MarkR thanks

having a go at;

/filename.jpg..

fingers crossed

 
Magento Community Magento Community
Magento Community
Magento Community
 
RobOrr
Sr. Member
 
Avatar
Total Posts:  218
Joined:  2008-06-04
 

Mike - did you get any results? Post an update for your solution if you don’t mind…

 
Magento Community Magento Community
Magento Community
Magento Community
 
mikeinspain
Sr. Member
 
Avatar
Total Posts:  108
Joined:  2007-10-08
Alicante, Spain
 
RobOrr - 27 October 2008 04:15 PM

Mike - did you get any results? Post an update for your solution if you don’t mind…

Hey

What I did was upload all my images into the media import folder via FTP.  No organisation as if I am the dataflow will in turn organise these images automatically upon successful import.

/media/import/

I was lucky in that I my images were mostly named by product code/sku #.  So I knew which images belonged where.

After the import, I opened up the CSV file that I exported.  Under the 3 image columns, I entered the image filename for each product.

/imagefilename.jpg
and then moved onto the next product.  I am using a small image for each column as this is how my site is working.  A matter of copy/paste for me.

/image_thumb.jpg
followed by
/image_small.jpg
and then
/image_large.jpg
is what you are popping on to the CSV.

Once that is complete, go back to the Admin Panel - Import/Export Profiles - Import All Products..  Grab a beer, pop your feet and and have your fingers crossed!!  grin

Hope that helps.  Let me know how you get on.

 
Magento Community Magento Community
Magento Community
Magento Community
 
RobOrr
Sr. Member
 
Avatar
Total Posts:  218
Joined:  2008-06-04
 
mikeinspain - 27 October 2008 11:32 PM

RobOrr - 27 October 2008 04:15 PM
Mike - did you get any results? Post an update for your solution if you don’t mind…

Hey

What I did was upload all my images into the media import folder via FTP.  No organisation as if I am the dataflow will in turn organise these images automatically upon successful import.

/media/import/

I was lucky in that I my images were mostly named by product code/sku #.  So I knew which images belonged where.

After the import, I opened up the CSV file that I exported.  Under the 3 image columns, I entered the image filename for each product.

/imagefilename.jpg
and then moved onto the next product.  I am using a small image for each column as this is how my site is working.  A matter of copy/paste for me.

/image_thumb.jpg
followed by
/image_small.jpg
and then
/image_large.jpg
is what you are popping on to the CSV.

Once that is complete, go back to the Admin Panel - Import/Export Profiles - Import All Products..  Grab a beer, pop your feet and and have your fingers crossed!!  grin

Hope that helps.  Let me know how you get on.

That’s good info Mike - thanks for the update. I’ll run it later when I get home today.  So if I understand you correctly you appended each of your image names with “_thumb”, “_small”, “_large” etc.?  Is that all it took?  I’ve moved all my images out of my ‘var’ file in the root where I initially FTP’d them, to media/import/ and they’re in a folder there named “images” so the path looks like media/import/images/myimage.gif. (they’re all gif images).  If that’s all it took I will be INCREDIBLY happy (although there are almost 10K images to change :( )!  I’m building 3 stores simultaneously, and this one I’m working on now is where I’m trying to work out all the bugs.

 
Magento Community Magento Community
Magento Community
Magento Community
 
RobOrr
Sr. Member
 
Avatar
Total Posts:  218
Joined:  2008-06-04
 

BTW - I noticed that your path was

media/import
.  Did you place your images within an image folder there,
media/import/images/
or just put them in to the media/import folder by themselves?

Thanks for the help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mikeinspain
Sr. Member
 
Avatar
Total Posts:  108
Joined:  2007-10-08
Alicante, Spain
 

Hi

I Just placed the images in that folder.  /media/import/

What I mentioned earlier about the images - thumb, small, large… I mentioned the filenames like that as that is how the field is export via CSV. 

It is entirely up to you how you name the images and how you organise them..  As long as they are in the right place and you input it correctly on the CSV file then you should be good to go.

I would maybe try perhaps a 50/100 images or something.  If those are successful then completing the rest should be a breeze..  wink

Let us know if you run into any probs…

 
Magento Community Magento Community
Magento Community
Magento Community
 
RobOrr
Sr. Member
 
Avatar
Total Posts:  218
Joined:  2008-06-04
 

Thanks for the reply - It shouldn’t be that difficult to move those images up one level. I’ll start with that, and if that doesn’t work I’ll keep working. 

Let me ask - it would seem that it’s been stated that once the image has been imported via the dataflow (and it actually works) that it would be removed from the location that it was FTP’d to and in to the database - is that correct?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mikeinspain
Sr. Member
 
Avatar
Total Posts:  108
Joined:  2007-10-08
Alicante, Spain
 

Hey

As far as I am aware the images that are placed in the media/import folder will stay in there even with an successful import…

Well at least it did for me??  grin

What I did after was to backup all those images into a tar file so that if there were any problems I could simply go back in and upload them again if required.

That may be a option or it may not..  Just thought I would mention it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
RobOrr
Sr. Member
 
Avatar
Total Posts:  218
Joined:  2008-06-04
 

Okay - i’ve got a new problem - my profile won’t run!  I’ve tried several times to run my import all products profile, but when I do, it brings me back to my login page.  What’s up with that?

 
Magento Community Magento Community
Magento Community
Magento Community
 
RobOrr
Sr. Member
 
Avatar
Total Posts:  218
Joined:  2008-06-04
 

when I try to run my profile it just returns me to my login page.  I created a different profile and tried that, but the same thing happened.  I have no idea where to even begin to look to fix that.

 
Magento Community Magento Community
Magento Community
Magento Community
 
RobOrr
Sr. Member
 
Avatar
Total Posts:  218
Joined:  2008-06-04
 

btw - I’ve checked with my host and there are no apparent problems - db is running fine.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mikeinspain
Sr. Member
 
Avatar
Total Posts:  108
Joined:  2007-10-08
Alicante, Spain
 
RobOrr - 28 October 2008 04:32 PM

btw - I’ve checked with my host and there are no apparent problems - db is running fine.

Hey..  Not really sure if I can help further.  Not sure who your host is?

Hopefully someone else may be able to offer more help.  One thing to perhaps check is the file permissions for the site..  This can be achieved via SSH is this is something you are familiar with.  http://www.magentocommerce.com/wiki/groups/227/resetting_file_permissions

If I think of anything I post it here..

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 6