Skip to content
Advertisement

How to change category thumbnail size in WooCommerce

With the following code I managed to display my featured categories title, description and thumbnail. When I uploaded the thumbnail, it was 500 * 500 in its dimensions. But when I visit the page I see the thumbnail being cropped as 150 * 150.

JavaScript

How can I change the size of my categorythumbnails?

It is my first time doing a WooCommerce site.

Advertisement

Answer

You should use wp_get_attachment_image_src(); for getting different sizes of image. This will return you an array with URL, width, height and cropping mode of this image. Have a try

JavaScript

Let me know if you need any more assistance. Thanks

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement