Need the image height of the banner to be in its original size, please help asap
store link: https://a9udfonrb9ode3mv-21603111.shopifypreview.com/collections/activewear
A user is experiencing issues with banner image sizing on their Shopify collection pages, seeking help to display images at their original dimensions.
Initial Problem & Solution:
styles.css, targeting .collection-header classes to set height to auto and adjust positioningFollow-up Issues:
flex: 0 0 100% propertyRoot Cause Identified:
main-collection.liquid fileCurrent Status:
Need the image height of the banner to be in its original size, please help asap
store link: https://a9udfonrb9ode3mv-21603111.shopifypreview.com/collections/activewear
Hi @Janamir ,
This is Richard from PageFly - Landing page builder, I’d like to suggest this idea:
Step 1: Go to Online Store->Theme->Edit code
Step 2: Asset->/styles.css->paste below code at the bottom of the file:
.collection-header .header-text {
padding: 0 !important;
}
.collection-header.coloured-split.has-image {
background: transparent !important;
}
.collection-header #collectionimage {
height: auto !important;
}
.collection-header.coloured-split.has-image .header-image .rimage__image {
position: static;
object-fit: contain !important;
}
I hope it would help you
Best regards,
Richard | PageFly
@PageFly-Richard how can I make the width in full
here’s the store link: https://www.bohemianmama.com/collections/womens-new-arrivals
Hi @Janamir ,
Sure, I’m happy to help you. Let’s try this solution:
You can try replace previous my code by below code in styles.css file:
.collection-header .header-text {
padding: 0 !important;
}
.collection-header.coloured-split.has-image {
background: transparent !important;
}
.collection-header #collectionimage {
height: auto !important;
}
.collection-header.coloured-split.has-image .header-image .rimage__image {
position: static;
object-fit: contain !important;
}
.collection-header.coloured-split.has-image .header-image {
flex: 0 0 100% !important;
}
I hope it would help you
Best regards,
Richard | PageFly
@PageFly-Richard I applied the codes, but the image is blurry. Please help.
https://a9udfonrb9ode3mv-21603111.shopifypreview.com/collections/womens-new-arrivals
Hi @Janamir ,
The blurred image is because your liquid code is being resized.
You can go to file main-collection.liquid, Then find “1512x” → And replace 1512x to “master”
I hope it would help you
Best regards,
Richard | PageFly
@PageFly-Richard I dont see any 1512x in there.
This is all the codes:
{%- if collection.featured_image -%}
{% if section.settings.height == “fixed” %}
{% assign img_url = collection.featured_image | img_url: ‘1x1’ | replace: ‘1x1.', '{width}x.’ %}
Hi @Janamir ,
Sorry, I may have misremembered the file name. This part you may try contacting Shopify support or finding another expert regarding this issue.