Help with Product Image Thumbnail

Solved

Help with Product Image Thumbnail

Sheeks
Pathfinder
109 1 16

I’m having an issue with the thumbnail of one of my product images. It appears to shrink and doesn’t display like the others. Could you please assist me in resolving this so the thumbnail appears correctly, like the rest of the product images?


Others

WhatsApp Image 2024-09-11 at 08.28.53.jpeg


 problem: https://sheeksorority.com/products/halloween-primitive-womens-party-clothes-dance-party-cosplay

 

WhatsApp Image 2024-09-11 at 08.28.53 (1).jpeg

Accepted Solution (1)

BSSCommerce-B2B
Shopify Partner
1723 513 577

This is an accepted solution.

Dear my friend,

As same as problem like https://community.shopify.com/c/shopify-design/assistance-needed-with-prehistoric-cavewoman-costume-...

I noticed that you have customized the image size in another thread, but the image titled "Prehistoric Cavewoman Costume Image" has an issue. 

You need to add more script in theme.liquid to fix this only on Prehistoric Cavewoman Costume Page : 

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file.

3. Find the closing </body> tag, which is usually at the bottom of the file.

Before the closing </body> tag, add the following script:

 

 

 

<script>
    document.addEventListener("DOMContentLoaded", function() {
        if (window.location.pathname.includes("products/halloween-primitive-womens-party-clothes-dance-party-cosplay")) {
            var style=document.createElement('style');

            style.innerHTML=` 
            .main-product-thumbnail-img img {
                object-fit: contain !important;
            }

            @media only screen and (max-width: 768px) {
                .main-product-thumbnail-image-slider .slick-track {
                    width: fit-content !important;
                }

                .main-product-thumbnail-image-slider .slick-slide {
                    width: 85px !important;
                }

                .main-product-thumbnail-img img, .main-product-thumbnail-img .svg-placeholder {
                    object-fit: contain !important;
                }
            }

            `;
            document.head.appendChild(style);
        }
    });
</script>

 

 

 

The result will be: 

#Desktop: 

BSSCommerceB2B_0-1726015386755.png

#Mobile: 

BSSCommerceB2B_0-1726015951551.png

 

I hope these instructions will help you. If they are helpful, please give us likes and mark as the solution.

Have a nice day sir! 

 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

View solution in original post

Replies 4 (4)

BSSCommerce-B2B
Shopify Partner
1723 513 577

This is an accepted solution.

Dear my friend,

As same as problem like https://community.shopify.com/c/shopify-design/assistance-needed-with-prehistoric-cavewoman-costume-...

I noticed that you have customized the image size in another thread, but the image titled "Prehistoric Cavewoman Costume Image" has an issue. 

You need to add more script in theme.liquid to fix this only on Prehistoric Cavewoman Costume Page : 

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file.

3. Find the closing </body> tag, which is usually at the bottom of the file.

Before the closing </body> tag, add the following script:

 

 

 

<script>
    document.addEventListener("DOMContentLoaded", function() {
        if (window.location.pathname.includes("products/halloween-primitive-womens-party-clothes-dance-party-cosplay")) {
            var style=document.createElement('style');

            style.innerHTML=` 
            .main-product-thumbnail-img img {
                object-fit: contain !important;
            }

            @media only screen and (max-width: 768px) {
                .main-product-thumbnail-image-slider .slick-track {
                    width: fit-content !important;
                }

                .main-product-thumbnail-image-slider .slick-slide {
                    width: 85px !important;
                }

                .main-product-thumbnail-img img, .main-product-thumbnail-img .svg-placeholder {
                    object-fit: contain !important;
                }
            }

            `;
            document.head.appendChild(style);
        }
    });
</script>

 

 

 

The result will be: 

#Desktop: 

BSSCommerceB2B_0-1726015386755.png

#Mobile: 

BSSCommerceB2B_0-1726015951551.png

 

I hope these instructions will help you. If they are helpful, please give us likes and mark as the solution.

Have a nice day sir! 

 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

PageFly-Richard
Shopify Partner
4661 1068 1725

Hi @Sheeks 

 

This is Richard from PageFly - Shopify Page Builder App

 

Please add this code to your theme.liquid above the </head> to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: click on theme.liquid and paste the code above the </head>

{% if handle contains 'halloween-primitive-womens-party-clothes-dance-party-cosplay' %}
<style>
@media (max-width:767px){
.main-product-thumbnail-image-slider .slick-track {
width: fit-content;
}
.main-product-thumbnail-image-slider .slick-slide {
    width: 86px !important;
}
.main-product-thumbnail-img img, .main-product-thumbnail-img .svg-placeholder {
    object-fit: contain;
}
}
</style>
{%endif%}

PageFlyRichard_0-1726015508319.png

 


Or another simply way is to change the thumb image like other products ( size, dimension, etc..)

 

Hope this can help you solve the issue 

 

Best regards,

Richard | PageFly 

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 


All features are available from Free plan. Live Chat Support is available 24/7.

Dan-From-Ryviu
Shopify Partner
9551 1919 1955

There is an issue with your theme if the product has 3 images. 

- Helpful? Like and Accept solution! or Buy me coffee
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Ryviu: Aliexpress Reviews - AliExpress Reviews Importer, one-click import aliexpress reviews, export reviews to CSV file.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

GTLOfficial
Shopify Partner
549 116 108

Hello @Sheeks 
Go to online store ----> themes ----> actions ----> edit code ----> assets ----> main-product.css
add this code at the end of the file.

.main-product-thumbnail-img img, .main-product-thumbnail-img .svg-placeholder {
object-fit: contain;
}

result
1.png

If this was helpful, hit the like button and accept the solution.
Thanks

- Buy me a Pizza
- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on the store Hire me. GTL web solutions
- Want Complete Storefront: Send an email ⇨- Email: [email protected] - Skype: ritesh_27dh