8

I have Magento 2 and want to hide small images of the product that is added from the admin on frontend. I have hidden the small image attribute from admin but want to hide it from front-end as well.

  • you can try simple css trick to hide – Manoj Deswal Mar 28 '18 at 12:02
  • Can you please tell how @Manoj Deswal – A.Srivastava Mar 28 '18 at 12:21
  • you can try with code as well , check solution and let me know if any problem , i just checked it on luma based theme and it works – Manoj Deswal Mar 28 '18 at 12:36
  • Your code seems to be working but not as I want. It has hidden all the thumbnails. – A.Srivastava Mar 28 '18 at 13:19
  • oh I mistaken , could you please share some screenshots...so that will easy to know the right question – Manoj Deswal Mar 29 '18 at 3:28
9

You can try with either CODE or CSS

1) Changing / Adding code in your extended view.xml

Can find at below path or if not present then you can create

app/design/frontend/vendor-name/theme-name/etc/view.xml

Add below code

<vars module="Magento_Catalog">
    <var name="gallery">
        <var name="nav">false</var> <!-- Gallery navigation style (false/thumbs/dots) -->
    </var>
</vars>

Keep your cache disable or clear your cache

2) Using CSS in you custom style sheet

.fotorama__nav{display:none;}

Perform whatever things you do for using custom CSS to work

I hope this will get you desired solution

  • Sorry, But i think you did not completely get my point. When we add the image from admin then we have the various image attributes like Small, Base, Thumbnail etc. I want to hide the images that has "Small" as an attribute on product view page. – A.Srivastava Mar 28 '18 at 13:17
8

In admin panel product level,

when you are uploading the image and setting role as small in the same time choose Hide from Product Page checkbox as well.

then flush the cache and see result you will get your expected output (Your will not get small image in product detail page).

Reference Image

  • Seems broken either in 2.3.2 or some extension broke it. – dawhoo Sep 20 at 22:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.