8

I am importing products with Magmi but I can't get the images appearing, I have gone through the other questions but with no luck.

When I upload I dont get any images not found errors and it looks like it appears in the backend as it says hover to view image, but when I hover over it just dissapers like there is no image there.

I've got this in my "Read Local Images From" media/import in Magmi I am assuming this is public_html/media/import?

And I have the images in there and in my csv column I have image-name.jpg

Has anyone had this issue before and found a fix?

Matt
  • 1,747
  • 8
  • 33
  • 58
  • Values in image column should be `/image-name.jpg`.Note the `/` – blakcaps Jul 24 '12 at 10:14
  • @blakcaps that dosen't seemed to have worked either :S, Where should the images be and where should I tell Magmi to read the local images from? – Matt Jul 24 '12 at 10:16
  • All images should be in `media/import`.There should not be any sub folders.Magmi will automatically pickup images.Btw,Have you enabled `image attributes processor` plugin for magmi – blakcaps Jul 24 '12 at 12:36
  • Pl share part of csv file.Need to more information to provide solution – blakcaps Jul 31 '12 at 14:47
  • @blakcaps I have columns named image, small_image, thumbnail. And in each of these columns has the image name for example `30.1221.jpg`. I have noticed that when I have imported and look in the db the image paths are in catalog/product/3/0 for exmaple depending on the image name but it seems Magmi hasn't put the images in these right folders after import. – Matt Aug 01 '12 at 08:58
  • This type of question doesn't really belong on Stack Overflow, as it's not a programming question. You should take a look at http://area51.stackexchange.com/proposals/25439/magento and see about getting a proper place to put these kind of questions – Sturm Aug 02 '12 at 18:06

2 Answers2

6

Thats a sample of how i am use it. I notice that i need to upload the diff sizes to have them in the products.

sku,image,small_image,thumbnail,media_gallery,store,websites 4101078,/4101078-marquise-ring.jpg,/4101078-marquise-ring-s.jpg,/4101078-marquise-ring-t.jpg,/4101078-marquise-ring-2.jpg;/4101078-marquise-ring-3.jpg;/4101078-marquise-ring-4.jpg,,

Works perfect to me,

Try regenerate the images after the importation from the cashe menu

open-ecommerce.org
  • 1,763
  • 1
  • 25
  • 41
3

The file path is case sensitive in Linux. Don't forget to put in the right cases in your csv.

Like blakcaps mentioned, the value of image, small_image and thumbnail should always start with a slash. Say, if the path of your picture is "public_html/media/import/myfolder/Abc.jpg", it should look like this in your csv file.

   sku, image, small_image, thumbnail 
   sku_abc, /myfolder/Abc.jpg, /myfolder/Abc.jpg, /myfolder/Abc.jpg

And remember to give your web server read/write permission to "media" folder.

Joe Hong
  • 71
  • 2
  • I have put all my images in `media/import` and in my csv `/image-name.jpg`. After I have imported I dont get any errors saying that the image can't be found so it seems like it is finding the image, but it seems that Magmi isn't improting the image form the `media/import` folder to the catalog/product/../.. etc folder. – Matt Aug 01 '12 at 10:33
  • edit "conf/ImageAttributeItemProcessor.conf" in your magmi folder and change IMG:sourcedir to something like "IMG:sourcedir = "/absolute/path/to/image/folder" and see if it works. In order to go to the bottom of this, you should consider go to the function copyImageFile() in "magmi/plugins/extra/itemprocessors/imageprocessor/imageitattributeemprocessor.php" and see what is happening there. You should be able to follow the flow by adding a few "$this->log()" statements; – Joe Hong Aug 01 '12 at 11:29
  • I have just tried that but dosn't seem to have made a differance, When i go into a product after import it has the box which says hover for preview but when I do this it then just dissapers, not sure if this will help you figure it out. It is just like the images and folders are't being made in the `media/catalog/product` folder. Can you help me out with where to put the logs in the file? – Matt Aug 01 '12 at 11:30
  • I doubt it actually found the image. You should find this line "$exists=($this->getImageFSPath($imgfile,true)!==false);" at around 518; add this line below it: $this->log( "###" . $exists?"image found":"image not found" . "at $imgfile" , "warning"); if image found this point there is no problem with your csv and it is something to do with folder and file creation. else it is about your csv and magmi setting. – Joe Hong Aug 01 '12 at 11:53
  • I added that line and ran the import again, no erros showed on the import screen after importing unless it is ment to show the image somewhere else. Checked the product in magento and same as before no image is showing? – Matt Aug 01 '12 at 12:06
  • In the magmi config page above where the dropdown box is to select file import this line shows not sure if this has anything to do with it? `Notice: Uninitialized string offset: 0 in /home/toysfoir/public_html/upload/magmi/inc/magmi_config.php on line 141` – Matt Aug 01 '12 at 12:09
  • what is the version of your magmi install? You should be able to view the output in shell `/home/toysfoir/public_html/upload/magmi/cli/magmi.cli.php" -mode=create -CSV:filename="csvfilename" -IMG:sourcedir="/path/to/imagefolder" ` BTW, /home/toysfoir/public_html/upload is your magento root folder right? – Joe Hong Aug 01 '12 at 12:22
  • My Magmi is v0.7.17a and I dont have access to shell so wont be able to run that command. My Magento is installed in `/public_html` my magmi is installed in `/public_html/upload` is this maybe why there is this problem? – Matt Aug 01 '12 at 12:24
  • Hone Could I add something in the magmi config page under the `Filesystem Path to magento directory:` box? To say that magenot is installed in the directory above /upload? – Matt Aug 01 '12 at 12:38
  • open "magmi/conf/magmi.ini" and check basedir. change to "../../.." if it is a different value. Hopefully this is the issue. – Joe Hong Aug 01 '12 at 12:40