Good day,
Is there a quick way to resize or my blog photos to the same size? I have tried everything I can think of and they are all different sizes still.
Topic: Standardizing blog post image sizes in the Shopify Impact theme.
Problem: Blog images appeared at varying sizes on the blog listing page. User sought a quick way to make them uniform.
Info shared: Store URL provided for context. CSS-based solutions were proposed. “object-fit: cover” was recommended to crop images to a fixed frame without distortion.
Proposed solutions:
• Generic class approach (.blog-photo with fixed width/height and object-fit: cover) requiring adding the class to each image.
• Theme-targeted approach: Edit Online Store > Edit Code > Assets > theme.css and add a selector for blog cards.
Implementation details: Added CSS targeting .blog-post-card__figure img. Initial code set object-fit: cover; height: 300px; width: auto. This caused the main post image to appear too small.
Adjustment: Updated CSS to width: 100%; height: 300px; object-fit: cover to maintain full card width while enforcing uniform height.
Outcome: User confirmed the issue is resolved (also removed the main post). No further action items; discussion closed.
Good day,
Is there a quick way to resize or my blog photos to the same size? I have tried everything I can think of and they are all different sizes still.
Hi ,
.blog-photo {
width: 300px; /* Set your desired width */
height: 200px; /* Set your desired height */
object-fit: cover; /* This property ensures the image covers the defined dimensions */
}
apply the blog-photo class to all your blog photos:
try this and let me know if you still need any help.
Hi @Devinlabs , you will have to tell me where I need to apply that.
please place below code into your theme files,
Online Store > Edit Code > Assets > theme.css file and place at the very bottom OR
.blog-post-card__figure img {
object-fit: cover;
width: auto;
height: 300px;
}
Online Store > Edit Code > Layout > theme.liquid file before tag
Results:
You can put that into assets/theme.css
you just removed it? please show it again i will provide the code for that too.
update your code with this
.blog-post-card__figure img {
object-fit: cover;
width: 100%;
height: 300px;
}
@Liquid_xPert_SJ , I have removed the main post. All good. Thanks for the help.