20th Jun '22
/
3 comments

Image Sizes in Bricks

Image Sizes in Bricks

Bricks → Settings → General has a setting under Miscellaneous called “Generate Custom Image Sizes”.

Enabling this will register these image sizes in your Bricks-powered WordPress site:

  • bricks_large_16x9: 1200×675 pixels (cropped to fit)
  • bricks_large: 1200×9999 pixels (proportionally resized to fit inside dimensions)
  • bricks_large_square: 1200×1200 pixels (cropped to fit)
  • bricks_medium: 600×9999 pixels (proportionally resized to fit inside dimensions)
  • bricks_medium_square: 600×600 pixels (cropped to fit)

I find myself constantly looking for the list of the above and other image sizes and hence this post.

Below is a table of registered image sizes that come with:

  • WordPress (by default)
  • WooCommerce (by default)
  • Bricks (optional and not enabled by default)
Image Size HandleDimensionsImage CroppingNotes
thumbnail150×150true (cropped)Default in WordPress
medium300×300false (resized)Default in WordPress
medium_large768×0false (resized)Default in WordPress
large1024×1024false (resized)Default in WordPress
1536×15361536×1536false (resized)Default in WordPress
2x medium_large size
2048×20482048×2048false (resized)Default in WordPress
2x large size
woocommerce_thumbnail300×300true (cropped)Added by WooCommerce
woocommerce_single600×0false (resized)Added by WooCommerce
woocommerce_gallery_thumbnail100×100true (cropped)Added by WooCommerce
shop_catalog300×300true (cropped)Added by WooCommerce
shop_single600×0false (resized)Added by WooCommerce
shop_thumbnail100×100true (cropped)Added by WooCommerce
bricks_large_16x91200×675true (cropped)Added by Bricks (if enabled)
bricks_large1200×9999false (resized)Added by Bricks (if enabled)
bricks_large_square1200×1200true (cropped)Added by Bricks (if enabled)
bricks_medium600×9999false (resized)Added by Bricks (if enabled)
bricks_medium_square600×600true (cropped)Added by Bricks (if enabled)

Cropping behavior

The default value for this is false i.e., the image will be scaled or proportionately resized.

If true, the image will be cropped to the specified dimensions using center positions.

An example of when false is better is for showing posts (their featured images) in a masonry layout. We want the posts to have different heights. You would select or create an image size in this case with the cropping mode set to false.

An example of when true is better is for showing posts in a uniform grid where every post (its featured image) should be the same size.

Screenshot from wpmudev article:

Recommendations/Notes

Reference

/wp-content/themes/bricks/includes/setup.php.

Get access to all 610 Bricks code tutorials with BricksLabs Pro

3 comments

  • Hi Sridhar, is ImageOptim + Google Guetzli still the best? That video is from 2018. I use https://bulkresizephotos.com/ , maybe imageoptim or other produce better results? Thanks!

    • A

      I still use ImageOptim + Google Guetzli.

      There may be better software or options, but I haven't tried them.

      • Hi, sorry for the late reply. I found Imageoptim does a great job actually, thanks Sridhar!

Leave your comment

 

Related Tutorials..

Create A Customizable AJAX Add To Cart Button In Bricks Builder

Create A Customizable AJAX Add To Cart Button In Bricks Builder

In Bricks, you can simply create an Add To Cart button from a dynamic data / function {woo_add_to_cart}. This button supports AJAX as well if…
Pro
WooCommerce Product Carousel in Bricks

WooCommerce Product Carousel in Bricks

How to set up a carousel that shows WooCommerce products with the product title, price and Add to Cart button for each.
Categories:
Condition based on WooCommerce Product Attributes in Bricks

Condition based on WooCommerce Product Attributes in Bricks

How to display elements only when a specific WooCommerce product attribute is selected.
Categories:
Pro
Product Attribute based Related Products Bricks Query Loop

Product Attribute based Related Products Bricks Query Loop

How to output products related by value of attribute(s) for the current product on single WooCommerce product pages.
Categories:
Is WooCommerce Cart Empty Condition in Bricks

Is WooCommerce Cart Empty Condition in Bricks

Updated on 5 Nov 2024 Looking to conditionally render an element depending on whether the user's cart is empty or not when using WooCommerce? Add…
Pro
How to Modify Products Element Query in Bricks to Output Child Products

How to Modify Products Element Query in Bricks to Output Child Products

This Pro tutorial provides the steps to limit WooCommerce products output by Bricks' Products element on single product pages to only the children of the…