title: how do i programaticly delete duplicate images? in magento
body: <p>I manage a big web store with alot of products, and some of the products weren't correctly imported and the images got duplicated.
  the products just have 2 of the same images.
  i know that you can delete them by hand but that would take up all my life of time.</p>
  
  <p>i have searched the internet for some of the codes that can do it but they dont work for me.
  is there anybody who know a solution for this?
  I have tried to examine the codes that i got from the internet but i really can make them work.</p>
  
  <p>this is one of the solutions that didn't work for me:
  <a href="http://dltr.org/blog/magento/556/Magento-product-images-duplicate-issue-with-CSV-product-importer" rel="nofollow noreferrer">http://dltr.org/blog/magento/556/Magento-product-images-duplicate-issue-with-CSV-product-importer</a></p>
  
  <p>i have tried to test this query in the sql database but that does not give any result:</p>
  
  <pre><code>SELECT * FROM `catalog_product_entity_media_gallery` WHERE value_id != value_id AND value=value
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/djzNd.png" alt="enter image description here"></p>