- This topic has 11 replies, 3 voices, and was last updated 4 years, 3 months ago by
David.
-
AuthorPosts
-
December 12, 2021 at 6:34 am #2046406
aaron
How do I make all featured image size to a certain size?
December 12, 2021 at 10:52 am #2046707David
StaffCustomer SupportHi there,
ideally you want to ensure that all images you upload are the same size. However in Customuizer > Layout > Blog –> Featured Images you can ‘force’ the images to a specific size using the Width and Height fields:
https://docs.generatepress.com/article/adjusting-the-featured-images/
December 12, 2021 at 12:49 pm #2046769aaron
The featured image size on my category page is correctly adjusted. But my home page does not change, please advise
December 12, 2021 at 6:40 pm #2046946Elvin
StaffCustomer SupportHi Aaron,
Your home page is using WPSP so the adjustment for it should be done with the WPSP settings of the WPSP list you’ve added on it.
I’d consider installing WPSP’s beta version – https://wpshowposts.com/wp-show-posts-1-2-0/ – to use its image sizing feature.
December 13, 2021 at 6:35 am #2047455aaron
I download the beta version just now. It says “In 1.2.0, we simply allow you to choose from the existing sizes generated by WordPress. Of course, you can add your own sizes using the add_image_size() function.”
Under “Images”‘s Image size section, it says
Available image sizes: thumbnail, medium, medium_large, large, fullIf this what you’re referring to? If so, I’m looking for dimension adjustment instead of big/small sizes
December 13, 2021 at 2:11 pm #2047941David
StaffCustomer SupportUnless you have the Pro version ( which is no longer available ) you will need to add some CSS:
.wp-show-posts-single .wp-show-posts-image img { width: 100%; max-height: 250px; object-fit: cover !important; }December 14, 2021 at 6:01 am #2048657aaron
I add it on Customizing>Additional CSS, but it didn’t change
Is it because my homepage is a page instead of a post? If so how do I change it?December 14, 2021 at 6:25 am #2048683David
StaffCustomer SupportWhere did you add the CSS? I can’t see it on the site ?
December 14, 2021 at 4:40 pm #2049314aaron
Hi I removed it because it didn’t seem to work.
I’ve added the code back, can you check
December 14, 2021 at 7:25 pm #2049373Elvin
StaffCustomer SupportI’ve tested David’s CSS to be sure and it works as shown in this testing –
https://share.getcloudapp.com/xQuzPAEkI’ve checked how you’ve added it and it seems to be included in a @media rule.
Can you try moving it out of the @media rule?
December 15, 2021 at 6:30 am #2049846aaron
It worked, but this code looks like it’s making the higher height shorter (to balance the height of all thumbnail)
Instead, how do I make the width cropped in? (to balance the width)Also, for some reason the top header bar is showing blank now. can you help me?
December 15, 2021 at 6:47 am #2049866David
StaffCustomer SupportYou would use this CSS:
.wp-show-posts-single .wp-show-posts-image img { width: 100%; height: 500px; object-fit: cover !important; }BUT this will make ALL WPSPS Images 500px tall.
So now you got to select the Container Block that list is in, and give it an Advanced > Additional CSS Class eg.your-custom class( name it what you like ) and use that in your CSS:.your-custom class .wp-show-posts-single .wp-show-posts-image img { width: 100%; height: 500px; object-fit: cover !important; }Personally i would crop that one image to the same aspect ratio as the other images…. it will save you a lot of headaches 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.