What does Image Scale and Fill Background do?
It is a Drupal image effect that scales a source image to fit a configured canvas without cropping or distorting it, then fills the area the image does not cover with a background derived from the image - a blurred copy, a tiled copy, or its dominant colour.
How is it different from Drupal core's Scale and Crop?
Scale and Crop produces a fixed output size by discarding the content that falls outside the target ratio. Scale and fill background produces the same fixed output size without discarding anything; the image is made smaller and the remaining area is filled.
Does it work with transparent PNG logos?
Yes, from version 1.1.0. A transparent source is detected and given a flat filled background, chosen automatically to suit the artwork, set to a fixed colour, or derived from the artwork's own colour. Earlier versions composited transparent images onto a black canvas.
Which versions of Drupal does it support?
Drupal 10.3 or newer, including Drupal 11 and Drupal 12. It requires the GD image toolkit; under ImageMagick the effect returns without modifying the image.
Does it support SVG logos?
No. GD cannot read SVG and Drupal image styles do not process SVG files. Rasterise on upload, restrict the field to raster formats, or handle SVG separately.
Is the module covered by Drupal's security advisory policy?
Yes. Stable releases have been covered since 20 August 2026.
Can it produce Open Graph images?
Yes. Because the output is exactly the configured canvas, an image style at 1200×630 produces a social card at the dimensions the file must actually have - which matters because the consumer is a scraper that does not process the site's stylesheets.
Is there a performance cost?
The cost is incurred when derivatives are generated, not per request. The largest single factor is the resize ratio: moving it from 0.1 to 1.0 multiplied generation time by roughly ten in repeated measurements. Dominant colour is consistently cheaper than the blurred background.
Should I use this or CSS object-fit?
object-fit: contain costs no derivatives and is sufficient wherever the stored dimensions of the file do not matter. Use this module when the fill has to be computed from each image, or when the file itself must be the right shape - Open Graph images, newsletters, RSS enclosures and anything rendered outside the site's own stylesheets.
Image Scale and Fill Background 1.1.0 for Drupal