Skip to content

Dealing with image size consistency

It is usually easier, more efficient, and more predictable to enforce the consistency of images via the physical dimensions of an image rather than to do it via CSS.

Steps to do this:

  1. Create a custom image size via code or a plugin
  2. Regenerate media library
  3. Query the correct image size on the HTML or module

Please note: UABB modules do not respect WordPress image sizes for some reason as they maintain their own internal list. See this for a quick guide on how to use your custom image sizes with UABB modules. Important: if you have already added the size (either via code or plugin), there is no need to do it again via add_image_size() – just add the size slug to UABB’s size slug array through the filter they provided.

Steps 1 and 2 are pretty straightforward so just follow the WordPress code reference or plugin instructions.

Step 3 – Select the correct image size from the module’s dropdown field:

If using a Beaver Builder HTML module, use the below code:

[wpbb post:featured_image size='medium_square' display='tag' align='center' linked='yes']
Scroll To Top