Image_Sizes
Class Image_Sizes
Registers custom image sizes for the BigCommerce theme, providing predefined sizes for product images, thumbnails, and category images. The version constant is incremented when any changes are made to the image sizes list.
- Full name:
\BigCommerce\Assets\Theme\Image_Sizes
Constants
Constant | Visibility | Type | Value |
---|---|---|---|
VERSION | public | int | 2 |
STATE_META | public | string | ’bigcommerce_sizing’ |
BC_THUMB | public | string | ’bc-thumb’ |
BC_THUMB_LARGE | public | string | ’bc-thumb-large’ |
BC_SMALL | public | string | ’bc-small’ |
BC_MEDIUM | public | string | ’bc-medium’ |
BC_EXTRA_MEDIUM | public | string | ’bc-xmedium’ |
BC_LARGE | public | string | ’bc-large’ |
BC_CATEGORY_IMAGE | public | string | ’bc-category-image’ |
Methods
register_sizes
Registers custom image sizes with WordPress.
public register_sizes(): void
This method loops through the defined image sizes and registers each one using
the add_image_size
function. The sizes are registered when the theme is set up.
Automatically generated on 2025-01-21