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

Pro
Stock Quantity Block for WP Grid Builder

Stock Quantity Block for WP Grid Builder

In the unofficial WP Grid Builder Facebook group a user asked: Is it possible to show stock quantity on the card? I can't find it…
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:
Pro
Related FAQs on Product pages Based on Product Category Taxonomy in Bricks

Related FAQs on Product pages Based on Product Category Taxonomy in Bricks

On product pages, we show all the FAQs associated with the current WooCommerce product's product categories.
Categories:
Pro
Top-Level Product Categories in Bricks

Top-Level Product Categories in Bricks

How to show top-level WooCommerce product categories in Bricks using a query loop.
Categories:
[WooCommerce] Product Category Image Background in Bricks

[WooCommerce] Product Category Image Background in Bricks

How to set up the product category thumbnail image as the background of a Section.
Categories:
How to add a “Sold Out” badge for out of stock products in Bricks

How to add a “Sold Out” badge for out of stock products in Bricks

Looking to add a "Sold Out" badge for products in the Shop page for WooCommerce products that are out of stock when using Bricks' Products…
Side-by-side WooCommerce Quantity and Add to Cart in Bricks

Side-by-side WooCommerce Quantity and Add to Cart in Bricks

Looking to position the quantity input field and Add to cart button next to each other instead of one below the other in Bricks? Add…
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: