Background Adjustments Configuration
Control how product images are fitted inside their frames on Product Detail Pages (PDP). This setting removes the white bars around images by switching the fit mode used when rendering thumbnails and the active image.
Overview
The feature provides a simple toggle that changes the image fit behavior used by the gallery:
- Disabled: Uses the default fit, which can show white bars around images (letterboxing).
- Enabled: Uses cover-style fitting to fill the image area, removing visible white bars.
This affects both the active (large) image and the thumbnails in the PDP gallery.
Configuration
- Configuration Path:
Stores > Configuration > Magebit > Theme > Image Resizer - Option: Background Adjustments (Object Fit)
- Values: Disabled / Enabled

Behavior
Enabled
When enabled, PDP images are rendered without white bars. Both the active image and thumbnails fill the available frame.

Disabled
When disabled, PDP images may show white bars where the aspect ratio does not match the frame.

Implementation notes
- The gallery output is post-processed by a plugin that rewrites image URLs to use the Image Resizer with
object-fit: coverwhen the feature is enabled. - The logic compares the configured mode per store view. Only when set to Enabled does it apply the cover behavior; otherwise, Magento renders images using the default fit.
- The frame=false parameter in view.xml is honored only when the configuration is enabled. If disabled, this parameter is ignored and keep_frame=true is strictly enforced, resulting in the addition of white borders.