[PR #853] Background image support #24348

Open
opened 2026-01-31 09:02:44 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/853

State: closed
Merged: Yes


Summary of the Pull Request

Initial code check-in for background image support. Handles background images themselves, and adds options to profiles.json to control the feature.

References

#833

PR Checklist

  • Closes #833 (Not quite complete as the opacity setting is not fully robust, see below)
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated -- Adds (currently undocumented) settings to profiles.json, but profiles.json as a whole does not appear to be documented
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #833 -- aware of the discussion in #833

Detailed Description of the Pull Request / Additional comments

This adds three options to the individual profile options in profile.json:

  • backgroundImage: Expects a Uri which locates an image. This property is optional and defaults to null.
  • backgroundImageOpacity: Expects a number, controls opacity of the background image. Optional and defaults to 1.0.
  • backgroundImageStretchMode: expects one of "none", "fill", "uniform", or "uniformToFill", which controls the stretch mode used -- see documentation here. Optional and defaults to uniformToFill.

Background images are only displayed if useAcrylic is turned off.

One known issue:

backgroundImageOpacity currently only works with respect to the application's default black background and does not respect the profile's background color.

One potential issue:

There's no attempt to handle a failed image load from the Uri; I think it is reasonable to expect the underlying classes (specifically BitmapImage) to handle this gracefully. Additionally, it's unclear how such a failure should be reported to the user (beyond their requested image being displayed as a black console background instead)

**Original Pull Request:** https://github.com/microsoft/terminal/pull/853 **State:** closed **Merged:** Yes --- <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Initial code check-in for background image support. Handles background images themselves, and adds options to profiles.json to control the feature. <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References #833 <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [ ] Closes #833 (Not _quite_ complete as the opacity setting is not fully robust, see below) * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [x] Requires documentation to be updated -- Adds (currently undocumented) settings to profiles.json, but profiles.json as a whole does not appear to be documented * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #833 -- aware of the discussion in #833 <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments This adds three options to the individual profile options in profile.json: - backgroundImage: Expects a Uri which locates an image. This property is optional and defaults to null. - backgroundImageOpacity: Expects a number, controls opacity of the background image. Optional and defaults to 1.0. - backgroundImageStretchMode: expects one of "none", "fill", "uniform", or "uniformToFill", which controls the stretch mode used -- see [documentation here](https://docs.microsoft.com/en-us/dotnet/api/system.windows.media.stretch?view=netframework-4.8). Optional and defaults to uniformToFill. Background images are only displayed if useAcrylic is turned off. One **known** issue: backgroundImageOpacity currently only works with respect to the application's default black background and does not respect the profile's background color. One _potential_ issue: There's no attempt to handle a failed image load from the Uri; I _think_ it is reasonable to expect the underlying classes (specifically [BitmapImage](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.media.imaging.bitmapimage)) to handle this gracefully. Additionally, it's unclear how such a failure should be reported to the user (beyond their requested image being displayed as a black console background instead)
claunia added the pull-request label 2026-01-31 09:02:44 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#24348