title: Magento CSV Import Images Missing
body: <p>I edited my products by exporting them with the Import/Export Tool in magento, after I imported them I got faced with There was a problem with reindexing process, which I finally fixed. </p>
  
  <p>But now all my images are missing and not displaying in the front end, can someone help me fix this issue?</p>
  
  <p>/1/_/1_7_138.jpg is the format that the CSV images locations are</p>
  
  <p>I also tried moving the images in media/category/product to media/import but still not displaying correctly</p>
  
  <p>I also tried editing file permissions from 755 to 77 in the media folder but still nothing</p>
  
  <p>I also ran this in the corresponding SQL database</p>
  
  <pre><code>INSERT INTO catalog_product_entity_media_gallery (attribute_id, entity_id, `value`)
  SELECT ga.attribute_id, v.entity_id, v.value
  FROM catalog_product_entity_varchar v
  INNER JOIN eav_entity_type et ON et.entity_type_code=\'catalog_product\'
  INNER JOIN eav_attribute va ON va.entity_type_id=et.entity_type_id AND
  va.frontend_input=\'media_image\' AND va.attribute_id=v.attribute_id
  INNER JOIN eav_attribute ga ON va.entity_type_id=et.entity_type_id AND
  ga.attribute_code=\'media_gallery\'
  LEFT JOIN catalog_product_entity_media_gallery g ON g.entity_id=v.entity_id AND
  g.value=v.value
  WHERE v.value&lt;&gt;\'no_selection\' AND v.value&lt;&gt;\'\' AND g.value IS NULL;
  </code></pre>
  
  <p>and got the following error:</p>
  
  <pre><code>#1064 - You have an error in your SQL syntax; check the manual that corresponds to your
  MySQL server version for the right syntax to use near '\'catalog_product\' INNER JOIN
  eav_attribute va ON va.entity_ty
  </code></pre>