Shrink or Make Transparent: How to Customize Your Shopify Product Image Zoom Button
Hey there, fellow store owners! Ever found yourself staring at your beautiful product photos on Shopify, only to have that big, white zoom button just... sitting there, blocking a crucial detail? You're not alone! This is a common pain point, and it recently came up in a fantastic community discussion that I wanted to share some insights from.
Our friend jackdubl kicked off the thread, expressing frustration with the default zoom button. It’s that white circle with a magnifying glass, and while the zoom functionality is super useful for customers to get a closer look, the button itself can sometimes feel clunky or, worse, obscure part of your carefully staged product shot. Especially on mobile, where screen real estate is precious, it can be a real eyesore.
Jackdubl wanted to keep the zoom but wished they could shrink it, make it transparent, or even remove the white circle entirely. Sound familiar?
The Community's Solution: Custom CSS to the Rescue!
The good news is, the community quickly jumped in with some fantastic CSS solutions. The consensus? You absolutely can keep that valuable zoom functionality while making the button much more subtle and less intrusive. It all comes down to a few lines of Custom CSS.
Method 1: The Easiest Way – Using Theme Settings Custom CSS
One of the most straightforward and safest ways to apply these changes, especially if you're not super comfortable digging into theme code files, is by using your theme's built-in Custom CSS section. Ploqo, another helpful community member, demonstrated this method specifically for the Eclipse 5.3.1 theme, which jackdubl was using. This approach is generally applicable to most modern Shopify themes like Dawn, Refresh, Sense, etc., which usually have a dedicated Custom CSS area.
Here’s how you can do it:
- Navigate to Theme Settings: From your Shopify admin, go to Online Store > Themes.
-
Edit Your Theme: Find your current theme and click on Customize.
-
Find Custom CSS: In the theme editor, click the gear icon (Theme settings) in the bottom left corner. Scroll down until you find the Custom CSS section.
-
Paste the Code: Paste the following CSS code into the Custom CSS box:
.product-media__lightbox-zoom{ --size: 30px; } .product-media__lightbox-zoom .product-media__zoom-icon{ --icon-width: 15px !important; --icon-height: 15px !important; } .product-media__lightbox-zoom:before{ opacity: .5; } - Save Changes: Click Save.
Customizing the Look:
-
Button Size: To make the button smaller or larger, adjust the
--sizevalue in.product-media__lightbox-zoom{ --size: 30px; }. The default for Eclipse was 44px, so 30px is a good reduction. -
Transparency: To make the white circle more or less see-through, change the
opacityvalue in.product-media__lightbox-zoom:before{ opacity: .5; }. A lower number like.3will make it more transparent. -
Remove the Circle Entirely: If you want just the magnifying glass icon and no white background at all, replace the last line of code with:
.product-media__lightbox-zoom:before{ display: none; }
Method 2: Directly Editing Theme CSS Files (For Advanced Users or Specific Themes)
Another common approach, shared by ai-theme-code-editor and FoysalAhmed in the thread, involves directly editing your theme's CSS files. This is great if your theme doesn't have a Custom CSS section in the Theme Settings or if you need more granular control. However, always remember to duplicate your theme first before making any code changes! This way, you have a safe backup if anything goes wrong.
Here’s the general process:
- Duplicate Your Theme: In your Shopify admin, go to Online Store > Themes. Find your current theme, click Actions > Duplicate. Work on the duplicate.
- Edit Code: On your duplicate theme, click Actions > Edit code.
-
Locate CSS File: Look for a CSS file. Common names include
base.css,theme.css,component-slider.css, or sometimes files within anassetsfolder. The exact file depends on your theme. -
Add the CSS: At the very bottom of the chosen CSS file, paste one of the following code snippets.
Option A: Smaller, Semi-Transparent Button (Recommended First)
button.product__media-toggle, .product__media-icon { width: 32px !important; height: 32px !important; background: rgba(255, 255, 255, 0.35) !important; border-radius: 50%; } button.product__media-toggle svg, .product__media-icon svg { width: 16px !important; height: 16px !important; }This code makes the button smaller and gives it a subtle, semi-transparent white background, allowing your product image to show through. It's a great balance between visibility and aesthetics.
Option B: Magnifying Glass Icon Only (No White Circle)
button.product__media-toggle, .product__media-icon { background: transparent !important; box-shadow: none !n!important; }This option completely removes the white circle and any shadow, leaving just the magnifying glass icon. This can be very clean, but make sure the icon is still visible against your product images!
FoysalAhmed also shared a similar snippet with slightly different values and an alternative using
transform: scale():.product__media-icon { width: 28px !important; height: 28px !important; opacity: 0.65; } .product__media-icon svg { width: 14px !important; height: 14px !important; }Or, for a more subtle scaling effect:
.product__media-icon { transform: scale(0.7); opacity: 0.5; } - Save and Test: Save the file and preview your duplicate theme to ensure the changes look good on both desktop and mobile.
A Note on Selectors and Theme Compatibility
One important thing to remember, as highlighted by the experts in the thread, is that the exact CSS selector (like .product__media-icon or .product-media__lightbox-zoom) can vary slightly between different Shopify themes. If the code snippets above don't seem to work for your specific theme (e.g., Dawn, Refresh, Impulse, etc.), you might need to "inspect" the element on your product page to find the correct class name for your zoom button. A quick right-click on the button and selecting "Inspect" in your browser's developer tools will usually show you the relevant class names.
Jackdubl's experience was a great reminder that sometimes preview modes don't always reflect live changes perfectly. They initially thought the desktop view wasn't working, but it turned out to be a preview glitch. Desktop views often only show the zoom button on hover, making it less intrusive than on mobile where it's typically always visible.
Making these small design tweaks can significantly improve your store's aesthetic and user experience, especially on mobile devices. A cleaner product page means your products shine, not the UI elements. If you're just starting your journey with building an online store, these kinds of details are what help you stand out. Experiment with the opacity and size to find what best complements your brand and product photography. Happy customizing!



