How to add a fixed media size

Ticket for: Combo Blocks
0
How to add a fixed media size 1
Junhyeok Hong
Aug 09, 2020 07:50 PM 1 Answers
Member Since Jul 2020
Subscribed Subscribe Not subscribe
Flag(0)

I have purchased the pro version and I want to make my media display for a fixed size of the container. The same affect as the object-fit: cover. So basically, I wish to do this: https://share-hearts.com/the_arts_draft/

yet, I have this: https://share-hearts.com/the-arts/

I want to make sure that the size of the media is able to be altered by "cover". Adding object-fit: cover; in the custom css for media does not work. Could you please help resolve this issue?

2 Subscribers
How to add a fixed media size 1
How to add a fixed media size 3
Submit Answer
Please login to submit answer.
1 Answers
Sort By:
Best Answer
0
How to add a fixed media size 4
PickPlugins
Aug 11, 2020
Flag(0)

Welcome to our forum.

If your site contains any square size image you can use that size under media settings for post grid layout editor

https://imgur.com/IZUEWXC

 

If you don't see any square size image, then you can build it as following

 

#1, please add following code to your theme functions.php file

add_image_size( 'center-435', 220, 220, array( 'center', 'center' ) );

#2. install Regenerate Thumbnails plugins

https://wordpress.org/plugins/regenerate-thumbnails/

Then rebuild thumbnails,

https://imgur.com/pTT522j

Now you can choose "center-435" on post grid layout editor

Hope this helps.

Regards

Sign in to Reply
Replying as Submit