Solved

Why is only one product image not displaying properly on my website?

starkiller
New Member
7 0 0

Hi everyone,

 

I am having issues with just one product image not displaying properly and being cropped. I have attached a screenshot for reference, but I am just unsure why this is happening with just this one image and not my other product images.

 

You can see the Magic Protein tub is cut off but compared to all other products on my website they are all fine and working. When you click the product and go into the product page the image is also fine its just the preview image of the product.

 

Screenshot 2024-02-13 at 6.19.18 pm.png

Accepted Solution (1)

Moeed
Shopify Partner
3697 932 1166

This is an accepted solution.

Hey @starkiller 

 

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 </body> tag

<style>
.media.media--transparent.media--hover-effect img {
    object-fit: contain !important;
}
</style>

RESULT:

Moeed_0-1707809275047.png

 

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

 

Best Regards,
Moeed

Need a Shopify developer? Chat on WhatsApp


- For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️

View solution in original post

Replies 3 (3)

Moeed
Shopify Partner
3697 932 1166

This is an accepted solution.

Hey @starkiller 

 

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 </body> tag

<style>
.media.media--transparent.media--hover-effect img {
    object-fit: contain !important;
}
</style>

RESULT:

Moeed_0-1707809275047.png

 

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

 

Best Regards,
Moeed

Need a Shopify developer? Chat on WhatsApp


- For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️
starkiller
New Member
7 0 0

Thank you so much for your help, that fixed it straight away.

Moeed
Shopify Partner
3697 932 1166

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.

Need a Shopify developer? Chat on WhatsApp


- For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️