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 630 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..

Pro
How to Add Support for Variable Products in Bricks WooCommerce Filters

How to Add Support for Variable Products in Bricks WooCommerce Filters

Filtering for In Stock or Out of Stock WooCommerce products using Bricks' filters currently only works at the product level and not variation level. This…
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:
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
[WooCommerce] Sale price dates in Bricks

[WooCommerce] Sale price dates in Bricks

Outputting start and end sale price dates (if set) for WooCommerce products.
Categories: