Category image size not dependent on the title and description


I am trying to make all category images the same size, but because of the difference in title and the description, the images have different height. I want to have them all the same size without making the title and the discretion the same length. The same applies to the header image of a category. Is it possible?

Alternatively, to set the maximum and minimum height for a category image container.


Unfortunately, there’s no such feature, it would require a custom implementation.

Please try to use, for example this PHP snippet:

	function( $image_sizes ) {
		$image_sizes['portrait_small']['height'] = 400;
		$image_sizes['portrait_small']['width'] = 400;

		return $image_sizes;

Please note that it can require further customization.

​I hope this is helpful to you.

It does not have any effect on the image sizes. I have regenerated thumbnails, but still no change.


We checked this snippet from our side, and it seems okay.

Please provide more details (for example, what theme you are using, how you add this snippet, possibly screenshots, and a link to the site).

Hello Andrii,

I am using Rentalhive and Snippets


The snippet seems to be ok, it should work for category grid images, please let me know which theme you’re using.

I am using Rentalhive theme and Snippets plug-in

Sorry for the confusion, RentalHive theme has specific styles for category cards and it’s not possible to restrict the card height. The only possible solution is restricting title & description to one row (showing “…”) at the end, but these may become aunreadable.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.