What happened?
Description
When applying a letterbox transform to a greyscale source image, the letterbox is coming out transparent, when it should be white.
Steps to reproduce
- Create a new image transform with:
- Mode: letterbox
- Fill colour:
#ffffff
- Image format: webp
- Using this transform, output a greyscale source image and a colour source image. Couple of example images I'm using attached.


Expected behavior
Both transformed images have a white letterbox.
Actual behavior
The greyscale source image has a transparent letterbox.
The colour source image has a white letterbox.
Thanks for taking a look!
Craft CMS version
5.6.11
PHP version
8.2.22
Operating system and version
Linux 6.12.5-linuxkit (DDEV)
Database type and version
MySQL 8.0.36
Image driver and version
Imagick 3.7.0 (ImageMagick 6.9.11-60)
Installed plugins and versions
- CKEditor 4.6.0
- CP Field Inspect 2.0.4
What happened?
Description
When applying a letterbox transform to a greyscale source image, the letterbox is coming out transparent, when it should be white.
Steps to reproduce
#ffffffExpected behavior
Both transformed images have a white letterbox.
Actual behavior
The greyscale source image has a transparent letterbox.
The colour source image has a white letterbox.
Thanks for taking a look!
Craft CMS version
5.6.11
PHP version
8.2.22
Operating system and version
Linux 6.12.5-linuxkit (DDEV)
Database type and version
MySQL 8.0.36
Image driver and version
Imagick 3.7.0 (ImageMagick 6.9.11-60)
Installed plugins and versions