- This topic has 9 replies, 2 voices, and was last updated 3 years, 8 months ago by
Elvin.
-
AuthorPosts
-
December 27, 2021 at 11:41 pm #2061382
Gurer
Hi,
Is it possible to crop the featured images of blog post thumbnails to same size? (399x266px)
I tried;
in Customizer > Layout > Blog –> Featured Images >>> Archives. You can:
1. Select a smaller Media Attachment Size – if required.
2. Just set a Height Value that you want all images to be displayed at. And GP will add the necessary CSS to faux crop them
It doesn’t work for me.Site: https://www.wpdemopark.com/blog/
Problem: https://ibb.co/JH8SFx5Kind regards
December 27, 2021 at 11:46 pm #2061385Elvin
StaffCustomer SupportHi there,
Customizer settings won’t work on the images of that page as it’s using Block Element – Content Template for its images.
But we can try cropping the image using custom CSS if you can add the dynamic image inside a Container Block with
post-thumbnail-wrapper
class in it’s Additional CSS class(es) field.Let us know once you’ve applied this layout so we can re-check for the custom CSS writeup. 😀
December 27, 2021 at 11:58 pm #2061393Gurer
Hi Elvin,
As I know the blog archive page is generated auto. Do I have to create a new blog page to achieve this?
ThanksDecember 28, 2021 at 12:06 am #2061401Elvin
StaffCustomer SupportAs I know the blog archive page is generated auto.
Normally, yes, but your site has a Block Element – Content template so it overrides the customizer settings. 😀
Do I have to create a new blog page to achieve this?
No need. you just need to modify how the Block Element – Content template is laid out so we can have a specific selector to crop the featured image added by it. 😀
December 28, 2021 at 12:16 am #2061404Gurer
Hi,
Ok ready, now what we will gonna do?December 28, 2021 at 12:23 am #2061407Elvin
StaffCustomer Support1st, put the dynamic image block inside its own container block.
And on this container block, add a class.
Something like this – https://share.getcloudapp.com/Qwu4RegL
December 28, 2021 at 12:24 am #2061409Gurer
Ok I did it? Now?
December 28, 2021 at 1:45 am #2061460Elvin
StaffCustomer SupportThere’s an extra grid block inside of the container block.
Your current setup has:
Container Block
> Grid Block
>> Container Block
>>> Dynamic Featured image
…It should be simplified to:
Container Block
> Dynamic Featured image
…Once you have this corrected, you can add this CSS:
.post-thumbnail-wrapper > .gb-inside-container { height: 200px; } .post-thumbnail-wrapper > .gb-inside-container > * { width: 100%; height: 100%; } .post-thumbnail-wrapper > .gb-inside-container img { width: 100%; height: auto; }
This should crop the images like this: https://share.getcloudapp.com/L1uWPY9j
December 28, 2021 at 2:47 am #2061516Gurer
Bingo 🙂
Perfect help, thanks.December 28, 2021 at 5:13 pm #2062268Elvin
StaffCustomer SupportGlad to be of any help. No problem. 😀
-
AuthorPosts
- You must be logged in to reply to this topic.