How do I add a background to transparent images when zooming in?

Topic summary

Issue: In the Shopify Prestige theme, transparent product images display correctly on the off‑white page, but on desktop zoom the background turns black, obscuring part of the image. The goal was to match the zoomed background to the site’s off‑white color.

Attempt: A suggestion to add custom CSS targeting a zoomed image container background color did not work for the requester.

Solution: A contributor advised editing theme.liquid (Online Store > Edit code > theme.liquid) and inserting a custom code snippet just above the closing tag. The exact snippet is not visible in the thread extract, but it was intended to set the zoom view’s background to the desired off‑white.

Outcome: The requester confirmed the fix worked and the zoomed background now matches the page color.

Status: Resolved. Note: Images and an (omitted) code snippet are central to understanding the solution.

Summarized with AI on December 25. AI used: gpt-5.

Hey @Khyamtents

Follow these Steps:

  1. Go to Online Store

  2. Edit Code

  3. Find theme.liquid file

  4. Add the following code in the bottom of the file above tag


RESULT:

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed