Shopify themes, liquid, logos, and UX
I need help with one of my product images. As you can see on my store, the image of the Prehistoric Cavewoman Costume is getting cut off, unlike the other pictures that fit properly within the frame. I’m not sure why this specific image doesn’t fit like the others. Could you please guide me on how to fix this issue?
this one good
but look at this
https://sheeksorority.com/collections/handbag
Hi, @Sheeks
The original size of this image is different from other images and should be modified to 360 * 360.
Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!
Hi @Sheeks to clarify this edit the image itself.
The problem image is rectangular portrait aspect ratio, thin and tall , while the other images are square.
For consistency in themes and any other sales channels edit the image itself to be the proper size similar to the aspect ratio of the other images.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Hello, my friend @Sheeks !
I noticed that you have customized the image size in another thread, but the image titled "Prehistoric Cavewoman Costume Image" has an issue. Therefore, I'm providing you with a solution that allows you to resize just that specific image without affecting other customizations on the entire page. You can try the following instructions:
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() {
var imgElement = document.querySelector('#products-template--23094688284947__main-collection > div.main-products-wrapper > div.container > div > div:nth-child(5) > div > div.product-card-img.hover-image > a > div > img.product-first-img.lazyautosizes.lazyloaded');
if (imgElement) {
imgElement.style.setProperty('object-fit', 'contain', 'important');
}
});
</script>
And the result will be:
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
i already put but its not working
You don't need code for this, edit the image itself to be the proper aspect ratio, per my other post.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Hi @Sheeks ,
Sr about that.
You can try this code to replace previous my solution.
<script>
let imgElement = document.querySelector('#products-template--23094688284947__main-collection > div.main-products-wrapper > div.container > div > div:nth-child(6) > div > div.product-card-img.hover-image > a > div > img.product-first-img.lazyautosizes.lazyloaded');
if (imgElement) {
// Apply the object-fit property with !important
imgElement.style.cssText = 'object-fit: contain !important;';
}
</script>
I tried this code in console view (f12) and worked like this:
Hope it helps!
Try this one, my friend!
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
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024