Grey border around edges of product

Topic summary

A user encountered an unwanted grey border appearing around product images on their Shopify store, which was not related to image cropping.

Solution Provided:

  • Add custom CSS code to the theme.liquid file
  • Insert the code snippet above the </body> tag in the theme editor
  • The CSS targets product media elements to remove the border styling

Outcome:
The issue was successfully resolved using the provided code modification. The user confirmed the fix worked and expressed appreciation for the quick community support.

Summarized with AI on October 29. AI used: claude-sonnet-4-5-20250929.

hello everyone! I currently have a grey border around the edges of my product and was wondering if anyone knows how to fix it?

Please let me know. I’ll add a picture as well

1 Like

It’s nothing to do with the cropping by the way.

Hey @Gnarlyship

Welcome to Shopify Community! Can you share your Store URL so I can have a look on it? Also, if you have password enabled then please share the password as well. Your cooperation would be greatly appreciated.

Best Regards,
Moeed

https://admin.shopify.com/store/0p4zxx-wx/settings/domains

Password: Brick by brick

1 Like

What code

Hey @Gnarlyship

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 solve your problem then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

Moeed I love you. I love this community. You guys are so helpful and quick

1 Like

Thank you for your reply. I’m glad to hear that the solution worked well for you. If you require any more help, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated.