Shopify themes, liquid, logos, and UX
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
problem: https://sheeksorority.com/products/halloween-primitive-womens-party-clothes-dance-party-cosplay
Solved! Go to the solution
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:
#Mobile:
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
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:
#Mobile:
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
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%}
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.
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.
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
If this was helpful, hit the like button and accept the solution.
Thanks
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024