Blog Photos in theme: Impact

Topic summary

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.

Summarized with AI on January 2. AI used: gpt-5.

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.

@Laure5

can you please share the store url?

Thanks

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.

https://botanicumsa.co.za/blogs/botanicums-blog-posts

Hi @Devinlabs , you will have to tell me where I need to apply that.

@Laure5

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:

1 Like

My main post was affected now too and its picture is too small now. How do I fix this?

You can put that into assets/theme.css

1 Like

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.

1 Like