Community Fix: Shrink or Make Transparent Your Shopify Product Image Zoom Button

Hey everyone! As a Shopify migration expert and someone who spends a lot of time digging through the community forums, I often come across those little design frustrations that can really impact your store’s look and feel. One common snag that popped up recently, and really resonated with me, was from a store owner named jackdubl.

\

They brought up a great point about the default product image zoom button – that white circle with the magnifying glass. On many themes, it can be quite prominent, sometimes even blocking important parts of a product image, especially on mobile. The dilemma? You want the zoom functionality because it’s super helpful for customers to see details, but you don’t want a clunky button disrupting your beautiful product photography. Sound familiar?

\

The Problem: An Intrusive Zoom Button

\

Jackdubl's original post perfectly articulated the issue: "The zoom button (white circle with magnifying glass inside) on the product images blocks part of my product images and just looks bad all around when it’s over an image. I know I can turn it off, but I want the zoom functionality. Is there a way to shrink it, or remove the white circle, or make the button more transparent?"

\

This is a classic example of where a small design element can have a big impact on user experience. A large, opaque button can distract from your carefully curated product shots, potentially leading to a less professional look or even obscuring key features of your products.

\

The Community's Solution: Custom CSS to the Rescue!

\

The good news is, the Shopify community, as always, came through with some fantastic, actionable advice. The general consensus from experts like ai-theme-code-editor, FoysalAhmed, and Ploqo is that you can absolutely keep the zoom functionality while making the button much more subtle and less intrusive. The key? A few lines of custom CSS.

\

Understanding the CSS Approach

\

The core idea here is to target the CSS class of the zoom button and override its default styles. While the exact class name might vary slightly between themes (for example, some themes might use .product__media-icon or button.product__media-toggle, while others like Eclipse use .product-media__lightbox-zoom), the properties you’ll be adjusting are generally the same: width, height, opacity, and background.

\

Let's look at some of the common solutions shared in the thread:

\

Option 1: Shrink and Semi-Transparent (Recommended for Visibility)

\

This approach makes the button smaller and gives it a subtle transparency, so it blends in better without disappearing entirely. This is often the best balance.

\

Here’s a combined snippet from ai-theme-code-editor and FoysalAhmed that covers common selectors:

\
button.product__media-toggle,\
.product__media-icon {\
  width: 32px !important; /* Adjust button size */\
  height: 32px !important;\
  background: rgba(255, 255, 255, 0.35) !important; /* Semi-transparent white background */\
  border-radius: 50%; /* Keeps it circular */\
}\
\
button.product__media-toggle svg,\
.product__media-icon svg {\
  width: 16px !important; /* Adjust icon size */\
  height: 16px !important;\
}\
\

The !important flag ensures your custom styles override any existing theme styles. The rgba(255, 255, 255, 0.35) sets the background to white with 35% opacity, making it semi-transparent.

\

Option 2: Completely Transparent (Icon Only)

\

If you prefer just the magnifying glass icon without any background circle, you can make the button's background completely transparent and remove any shadows. This is a very minimalist look.

\
button.product__media-toggle,\
.product__media-icon {\
  background: transparent !important;\
  box-shadow: none !important;\
}\
\

Option 3: Theme-Specific Customization (Example: Eclipse Theme)

\

Ploqo provided an excellent example for the Eclipse 5.3.1 theme, which uses slightly different CSS variables and selectors. This highlights why knowing your theme is helpful, but also shows how flexible CSS can be!

\

First, here's what the problem looked like on Eclipse:

\
\"Big
\

And here’s the result after applying Ploqo’s fix, making it smaller and semi-transparent:

\
\"Smaller,
\

Here’s the specific CSS Ploqo shared for Eclipse, utilizing CSS variables:

\
.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; }\
\

You can adjust --size for the button, --icon-width/--icon-height for the icon, and opacity for transparency. To remove the circle entirely, Ploqo suggested swapping the last rule for .product-media__lightbox-zoom:before{ display: none; }.

\

How to Implement Custom CSS on Your Shopify Store

\

Adding this CSS to your theme is relatively straightforward. There are two main places you might do this, depending on your comfort level and theme structure:

\

Method 1: Using the Theme Editor's Custom CSS Section (Easiest)

\

This is generally the safest and easiest way for most store owners, as it keeps your customizations separate and makes updates simpler. This is the method Ploqo demonstrated:

\
    \
  1. From your Shopify admin, go to Online Store > Themes.
  2. \
  3. Find your current theme and click on Customize.
  4. \
  5. In the theme editor, look for the gear icon (Theme settings) in the bottom left or a "Theme settings" tab. Click it.
  6. \
  7. Scroll down until you find a section labeled Custom CSS.
  8. \
  9. Paste the CSS code you choose (from Option 1, 2, or your theme-specific code like Eclipse's) into this box.
  10. \
  11. Click Save.
  12. \
\

Here's a visual guide from Ploqo:

\ \ \

Method 2: Editing Theme Files Directly (Advanced)

\

If your theme doesn't have a Custom CSS section in the Theme settings, or if you prefer to keep your CSS organized within your theme's files, you can edit the code directly. This is what ai-theme-code-editor initially suggested.

\
    \
  1. From your Shopify admin, go to Online Store > Themes.
  2. \
  3. Find your current theme, click the Actions button, and then select Edit code.
  4. \
  5. In the Assets folder, look for your theme’s main CSS file. Common names include base.css, theme.css, or component-slider.css.
  6. \
  7. Paste the CSS code at the very bottom of this file.
  8. \
  9. Click Save.
  10. \
\

Important Note: Always duplicate your theme before making direct code edits! This creates a backup you can revert to if anything goes wrong.

\

Testing and Fine-Tuning

\

After applying the CSS, make sure to clear your browser cache and check your product pages on both desktop and mobile devices. Jackdubl initially thought the fix didn't apply to desktop but later realized it was a preview mode issue. So, always view your live site after changes!

\

Don't be afraid to play with the values! For example, in the first CSS snippet, you can adjust width, height, and the last number in rgba() (which controls opacity from 0 to 1) to find the perfect balance for your store's aesthetic. For Eclipse users, experiment with the --size and opacity values.

\

Ultimately, a small tweak like this can significantly enhance your customers' shopping experience, ensuring your beautiful product images are the star of the show. It's these kinds of details that really make a difference, especially for new merchants looking to build a professional Shopify store that stands out. Happy customizing!

Share:

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools