Archived topic
Featured image as background-size: cover in archieve posts
8 replies · Started by Manuel on March 12, 2018
Hi Tom, hi Leo,
I want to show all featured images in the same size so the featured image fills the whole "featured image section" in archieve page (maybe background-size: cover?).
Here's an example from the Elementor Posts Widget:
Any chance to achieve this?
Best regards and thanks in advance,
Manuel
Hi Manual,
Without seeing what you have so far, I would say that make sure the width of the image you uploaded is wide enough to fill the featured image container, then you can crop the height so that they are all the same:
https://docs.generatepress.com/article/adjusting-the-featured-images/
Let me know if this helps.
Hi Leo,
thanks for your reply.
The width is defenetly wide enough but it doesn't work for me. How can I crop the height without cropping the width?


And here's a LINK to my test site.
At the moment the featured image size in customizer is set to auto (default)
You can leave the width part blank (it would be auto) and just crop the height.
I've already tried but it doesn't work.
Here's another screenshot where I've set the height to 150px and the width to auto. The aspect ratio of the features image stays always the same.

What have I done wrong?
That means your server is initializing the image cropping. Can you see if this helps?: https://docs.generatepress.com/article/adjusting-the-featured-images/#fix-images-not-cropping
It works. Thanks a lot for figure it out for me.
No problem! :)