Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi,
we are currently using a Envy theme.
Trying to hide few thumbnails using alt text "hide"
the javascript to hide thumbnail with alt text "hide" is not working.
any suggestion?
this is what I've used in my theme.liquid
<script>
$( document ).ready(function() {
$(".product img[alt='hide']").parents('.product__media-item').hide();
});
</script>
I want to display only certain thumbnails.
Please visit your Online store > Themes > edit code > open theme.liquid file, add this CSS code under <head> element, and check if it works
<style>
img[alt="hide"] { display: none !important; }
</style>
- Found this helpful? Hit "Like" and "Accept as Solution"!
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
Built for Shopify
Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
Hi Dan,
Thank you for the reply.
I tried it and it did work but not the way I wanted it to be.
I just wanted to hide it from the thumbnail but still want to show it when the product is clicked.
But right now the image doesn't display when clicked.
Will there be an alternate way to do this?
I only want to display detail photo in the thumbnail and show correct image color when product is selected.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025