Site logo

Archived topic

Need to resize the feature Images on Nouveau Theme

10 replies · Started by Joe on November 22, 2022

Viewing posts 1–11 of 11

I would like to resize the featured images to the same size as the Nouveau theme but that's not happening.
Once I publish a post and click on Blog and the actual post, the image is much larger (maybe 1200 * 1200) than what is on the actual demo theme for Nouveau.

I've tried resizing but I'm not getting the result I want.

Hi Fernando,

I provided the link.

I see. These image sizes are controlled by WordPress. The determining factor of difference is the aspect ratio of the images you uploaded. The ones you uploaded have an aspect ratio of 1:1, whereas the ones in the demo are 3:2, thus the difference.

Would you like to resize your images to a similar aspect ratio through code? Doing this may crop the image though. If that's alright with you, you can try adding this code through Appearance > Customize > Additional CSS:

.single .featured-image img, .blog .post-image img {
    aspect-ratio: 3/2;
    object-fit: cover;
    object-position: top center;
}

Thanks,
Would I need to re-upload the images once the coding is done?

Hi there,

no, that CSS will force existing images to be displayed with a different aspect ratio. It doesn't change the image it just styles it.

uh, ok, so this would only apply to featured images or all images?
Also, I can just delete this CSS line in the future if I ever wanted to revert back?

It only applies to the featured images both in the single post and the archive.
And yes, you can delete the CSS and the images will revert.

Ok, thank you both. That worked!

resolved

Glad we could be of help!

This archived topic is closed to new replies.