Title: Doubles first image
Last modified: August 30, 2016

---

# Doubles first image

 *  [chickster25](https://wordpress.org/support/users/chickster25/)
 * (@chickster25)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/doubles-first-image/)
 * Hello
    When I activate the “magnify” option on my [http://www.smoochy.co.uk](http://www.smoochy.co.uk)
   website, every product then shows the first product image twice in the thumbnails
   section.
 * When I deactivate your magnify option, it removes the product scroll and shows
   all the images and the double first image is removed?
 * [https://wordpress.org/plugins/yith-woocommerce-zoom-magnifier/](https://wordpress.org/plugins/yith-woocommerce-zoom-magnifier/)

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/doubles-first-image/#post-6303302)
 * It seem the plugin is not activated.
 *  [MaddieP](https://wordpress.org/support/users/maddiep/)
 * (@maddiep)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/doubles-first-image/#post-6303310)
 * Hi
    Super plugin! love it But I am also getting the featured image twice in the
   thumb gallery below main image……..
 * [http://www.thegallerykohphangan.com/?product=faceted-garnet-bracelet](http://www.thegallerykohphangan.com/?product=faceted-garnet-bracelet)
 * How can I hide this first or duplicated image?
    Thanks Maddie
 *  Thread Starter [chickster25](https://wordpress.org/support/users/chickster25/)
 * (@chickster25)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/doubles-first-image/#post-6303317)
 * I have had to untick the option “Activate YITH Magnifier” to stop the duplicate
   image issue from happening.
 * The actual plugin is activated.
 *  [MaddieP](https://wordpress.org/support/users/maddiep/)
 * (@maddiep)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/doubles-first-image/#post-6303318)
 * Hi, thanks. That does prevent the duplicate but it no longer switches the featured
   image for the chosen thumbnail, it has reverted to opening thumbnail in lightbox.
   I will continue to look for a fix, I am sure I can add some code to prevent the
   duplicate with a bit of more work 🙂
 *  Thread Starter [chickster25](https://wordpress.org/support/users/chickster25/)
 * (@chickster25)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/doubles-first-image/#post-6303343)
 * Hello, any possible fix to this as would really like to get this working?
 * Thanks
 *  [MaddieP](https://wordpress.org/support/users/maddiep/)
 * (@maddiep)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/doubles-first-image/#post-6303344)
 * Its complicated way beyond my coding abilities. There is a Woothemes variation
   swatches and photos plugin that does this plus a lot lot more but its pricey 
   if you only need it once and not really need all the other features. I will just
   ask client to either live with duplicate or turn it off and live with the (yucky)
   lightbox!
 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/doubles-first-image/#post-6303345)
 * [@maddiep](https://wordpress.org/support/users/maddiep/),
    please open a different
   topic, so we can understand and work on your specific problem.
 * [@chickster25](https://wordpress.org/support/users/chickster25/),
    you can fix
   the problem avoiding to use the same image set as featured, in the gallery.
 *  Thread Starter [chickster25](https://wordpress.org/support/users/chickster25/)
 * (@chickster25)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/doubles-first-image/#post-6303346)
 * Hello
 * thanks for your answer but that isnt going to resolve the problem as the products
   are loaded automatically, so it would be impossible to manually remove an image
   from every product gallery as there are thousands and the systems resyncs all
   the products & images daily anyway
 *  [begona.alvarezd](https://wordpress.org/support/users/begonaalvarezd/)
 * (@begonaalvarezd)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/doubles-first-image/#post-6303377)
 * I found a beautiful solution for this after studying their code.
    Just go to 
   your theme directory (or child-theme better if you have one) and create a folder
   called: single-product
 * Inside that directory, copy the file product-thumbnails-magnifier.php of the 
   yith plugin that you find in: wp-content/plugins/yith-woocommerce-zoom-magnifier/
   templates/single-product/product-thumbnails-magnifier.php
 * There, just below the line 17 that says:
 * `if ( ! empty( $attachment_ids ) ) array_unshift( $attachment_ids, get_post_thumbnail_id());`
 * paste the following:
 * `$attachment_ids = array_unique($attachment_ids);`
 * And voilá! It works! The problem is that the array generated in line 17 returns
   a duplicated ID. With my code I am just forcing this array of IDs to contain 
   only unique numbers and not duplicated ones.
 *  Thread Starter [chickster25](https://wordpress.org/support/users/chickster25/)
 * (@chickster25)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/doubles-first-image/#post-6303384)
 * that’s great and it works, well done and thank you.
 * Lets hope the folder doesn’t get deleted when the theme is updated.
 * Why cant the plugin developer fix this?
 *  [begona.alvarezd](https://wordpress.org/support/users/begonaalvarezd/)
 * (@begonaalvarezd)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/doubles-first-image/#post-6303385)
 * If you dont have a child theme activated, it will get deleted as soon as you 
   theme is updated. Child-themes are to prevent this kind of problems. If you dont
   activate one, just have a copy of that file somewhere to upload it again when
   your theme is updated. Keep it in mind and hopefully the plugin developers will
   fix it soon.
 * PS: pay attention on the new update of the yith plugin, if you experience something
   weird with the future update, remove what you just created. Or just post something
   in this topic and I will receive an email notifying me your problem 🙂 Happy 
   to help!
 *  [MaddieP](https://wordpress.org/support/users/maddiep/)
 * (@maddiep)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/doubles-first-image/#post-6303394)
 * Brilliant!! Just perfect thank you. All is solved.
    Good work thanks 🙂 Maddie
 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/doubles-first-image/#post-6303408)
 * Thanks begona.alvarezd, we have added your fix to the updated version that has
   been just released.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Doubles first image’ is closed to new replies.

 * ![](https://ps.w.org/yith-woocommerce-zoom-magnifier/assets/icon.svg?rev=3055439)
 * [YITH WooCommerce Product Gallery & Image Zoom](https://wordpress.org/plugins/yith-woocommerce-zoom-magnifier/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yith-woocommerce-zoom-magnifier/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yith-woocommerce-zoom-magnifier/)
 * [Active Topics](https://wordpress.org/support/plugin/yith-woocommerce-zoom-magnifier/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yith-woocommerce-zoom-magnifier/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yith-woocommerce-zoom-magnifier/reviews/)

 * 13 replies
 * 4 participants
 * Last reply from: [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/doubles-first-image/#post-6303408)
 * Status: not resolved