backgroundImage path invalid #10472

Closed
opened 2026-01-31 02:22:28 +00:00 by claunia · 16 comments
Owner

Originally created by @shen-lan on GitHub (Sep 3, 2020).

  "profiles": {
    "defaults": {
      "background": "#000",
      "useAcrylic": true,
      "acrylicOpacity": 0.7,
      "backgroundImageAlignment": "bottomRight",
      "backgroundImageOpacity": 0.5,
      "backgroundImage": "‪F:\\codebg.jpg"
      // Put settings here that you want to apply to all profiles.
    },

image
image

Originally created by @shen-lan on GitHub (Sep 3, 2020). ``` "profiles": { "defaults": { "background": "#000", "useAcrylic": true, "acrylicOpacity": 0.7, "backgroundImageAlignment": "bottomRight", "backgroundImageOpacity": 0.5, "backgroundImage": "‪F:\\codebg.jpg" // Put settings here that you want to apply to all profiles. }, ``` ![image](https://user-images.githubusercontent.com/21122615/92086000-29f9ce00-edfc-11ea-9384-9fae2ba1b3f2.png) ![image](https://user-images.githubusercontent.com/21122615/92086027-31b97280-edfc-11ea-830b-b81cbdf567fb.png)
claunia added the Needs-TriageNeeds-Tag-FixNeeds-Author-FeedbackProduct-Terminal labels 2026-01-31 02:22:28 +00:00
Author
Owner

@DHowett commented on GitHub (Sep 4, 2020):

What kind of drive is F:? Is it a mapped network drive? Is it removable? What version of Windows? What version of Windows Terminal?

@DHowett commented on GitHub (Sep 4, 2020): What kind of drive is `F:`? Is it a mapped network drive? Is it removable? What version of Windows? What version of Windows Terminal?
Author
Owner

@shen-lan commented on GitHub (Sep 4, 2020):

"F" is NTFS, it is my local drive .
Windows version: win 10 professional 18363.1049
Windows Terminal: 1.2.2381.0

@shen-lan commented on GitHub (Sep 4, 2020): "F" is NTFS, it is my local drive . Windows version: win 10 professional 18363.1049 Windows Terminal: 1.2.2381.0
Author
Owner

@shen-lan commented on GitHub (Sep 4, 2020):

The Error:

找到一个具有无效 "backgroundImage" 的配置文件。将该配置文件设置为默认设置为不包含背景图像。请确保在设置 "backgroundImage" 时,该值是指向图像的有效文件路径。
@shen-lan commented on GitHub (Sep 4, 2020): The Error: ``` 找到一个具有无效 "backgroundImage" 的配置文件。将该配置文件设置为默认设置为不包含背景图像。请确保在设置 "backgroundImage" 时,该值是指向图像的有效文件路径。 ```
Author
Owner

@miss85246 commented on GitHub (Sep 11, 2020):

I encountered the same mistake and this is my settings.json file:

 {
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "name": "Windows PowerShell",
                "commandline": "powershell.exe",
                "hidden": false,
                "fontSize": 14,
                "useAcrylic": true,
                "acrylicOpacity": 0.75,
                "backgroundImage": "https://gitee.com/Connor_Zhang/Blog/raw/master/Pics/%E5%A4%9C%E8%A1%8C.jpg",
                "backgroundImageOpacity": 0.5
            },

Setting the backgroundImage does not take effect
What should I do ?

@miss85246 commented on GitHub (Sep 11, 2020): I encountered the same mistake and this is my `settings.json` file: ```json { "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "name": "Windows PowerShell", "commandline": "powershell.exe", "hidden": false, "fontSize": 14, "useAcrylic": true, "acrylicOpacity": 0.75, "backgroundImage": "https://gitee.com/Connor_Zhang/Blog/raw/master/Pics/%E5%A4%9C%E8%A1%8C.jpg", "backgroundImageOpacity": 0.5 }, ``` Setting the backgroundImage does not take effect What should I do ?
Author
Owner

@DHowett commented on GitHub (Sep 11, 2020):

@misss85246...

when I click on that URL, i get this:

image

Do you think that the background image being an invalid url might be why it isn't working?

@DHowett commented on GitHub (Sep 11, 2020): @misss85246... when I click on that URL, i get this: ![image](https://user-images.githubusercontent.com/189190/92970538-b119f800-f433-11ea-8c7d-24ad5f07ce1d.png) Do you think that **the background image being an invalid url** might be why it isn't working?
Author
Owner

@miss85246 commented on GitHub (Sep 12, 2020):

@DHowett Thank you for answering my question
I don't think so, I tried lot's of image's URL, and none of them are effective, the background always black, I don't think these URLs are invalid. please try these images:

https://img-blog.csdnimg.cn/20200912084246200.jpg
http://bimgs.plmeizi.com/images/bing/2020/OHR.MedievalRocamadour_ZH-CN7063423495_1920x1080.jpg
https://timgsa.baidu.com/timg

My Windows Version is 20H2(19042.508) & Terminal Version is 1.2.2381.0
This situation only appears on my personal computer. There is no such problem on my company's computer.
By the way, the system version and software version of these two computers are the same

@miss85246 commented on GitHub (Sep 12, 2020): @DHowett Thank you for answering my question I don't think so, I tried lot's of image's URL, and none of them are effective, the background always black, I don't think these URLs are invalid. please try these images: ```shell https://img-blog.csdnimg.cn/20200912084246200.jpg http://bimgs.plmeizi.com/images/bing/2020/OHR.MedievalRocamadour_ZH-CN7063423495_1920x1080.jpg https://timgsa.baidu.com/timg ``` My Windows Version is 20H2(19042.508) & Terminal Version is 1.2.2381.0 This situation only appears on my personal computer. There is no such problem on my company's computer. By the way, the system version and software version of these two computers are the same
Author
Owner

@DHowett commented on GitHub (Sep 12, 2020):

Thanks!

We recommend saving images locally to avoid any issues. Do you still get an error if you do that?

@DHowett commented on GitHub (Sep 12, 2020): Thanks! We recommend saving images locally to avoid any issues. Do you still get an error if you do that?
Author
Owner

@miss85246 commented on GitHub (Sep 12, 2020):

Hi, It's work, thank you !
And I try to transcode the image into base64 format before adding it to the configuration,
It's also doesn't work. Is the image in base64 format not supported, or is this an mistake ?
Well, anyway my problem has been solved. Thank you very much !

@miss85246 commented on GitHub (Sep 12, 2020): Hi, It's work, thank you ! And I try to transcode the image into base64 format before adding it to the configuration, It's also doesn't work. Is the image in base64 format not supported, or is this an mistake ? Well, anyway my problem has been solved. Thank you very much !
Author
Owner

@shen-lan commented on GitHub (Sep 12, 2020):

@misss85246 How did you solve this problem?

@shen-lan commented on GitHub (Sep 12, 2020): @misss85246 How did you solve this problem?
Author
Owner

@miss85246 commented on GitHub (Sep 12, 2020):

@shen-lan
I Just saving images locally and It worked

@miss85246 commented on GitHub (Sep 12, 2020): @shen-lan I Just saving images locally and It worked
Author
Owner

@zadjii-msft commented on GitHub (Sep 29, 2020):

Okay so it sounds like saving the images locally is the workaround to @misss85246's issue, but not OP's issue here.

@shen-lan can you successfully set the backgroundImage to another file on the machine, other than the F:\codebg.jpg one? perhaps the terminal is having difficulty with just that image in particular. I'd try images on other drives, in other directories, with different extensions, etc.

@zadjii-msft commented on GitHub (Sep 29, 2020): Okay so it sounds like saving the images locally is the workaround to @misss85246's issue, but not OP's issue here. @shen-lan can you successfully set the `backgroundImage` to _another_ file on the machine, other than the `F:\codebg.jpg` one? perhaps the terminal is having difficulty with just that image in particular. I'd try images on other drives, in other directories, with different extensions, etc.
Author
Owner

@ghost commented on GitHub (Oct 3, 2020):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Oct 3, 2020): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@luwanglin commented on GitHub (Oct 15, 2020):

I also encountered the same problem

@luwanglin commented on GitHub (Oct 15, 2020): I also encountered the same problem
Author
Owner

@zadjii-msft commented on GitHub (Oct 15, 2020):

@luwanglin "I also hit this" isn't really helpful for debugging the issue. Can you successfully set the backgroundImage to another file on the machine, other than the [one that doesn't work]? Perhaps the terminal is having difficulty with just that image in particular. I'd try images on other drives, in other directories, with different extensions, etc.

@zadjii-msft commented on GitHub (Oct 15, 2020): @luwanglin "I also hit this" isn't really helpful for debugging the issue. Can you successfully set the `backgroundImage` to another file on the machine, other than the \[one that doesn't work\]? Perhaps the terminal is having difficulty with just that image in particular. I'd try images on other drives, in other directories, with different extensions, etc.
Author
Owner

@luwanglin commented on GitHub (Oct 15, 2020):

@luwanglin "I also hit this" isn't really helpful for debugging the issue. Can you successfully set the backgroundImage to another file on the machine, other than the [one that doesn't work]? Perhaps the terminal is having difficulty with just that image in particular. I'd try images on other drives, in other directories, with different extensions, etc.

The problem I encountered is the same as the issue problem mentioned above. The problem is that it has been used for a while, and the background image can be displayed normally before setting up the background image. However, it was probably yesterday that the same bug as the screenshot above appeared. The same path went wrong. I I wonder if it’s the problem with my updated version, my version is Windows Terminal Preview
Version: 1.4.2652.0

@luwanglin commented on GitHub (Oct 15, 2020): > @luwanglin "I also hit this" isn't really helpful for debugging the issue. Can you successfully set the `backgroundImage` to another file on the machine, other than the [one that doesn't work]? Perhaps the terminal is having difficulty with just that image in particular. I'd try images on other drives, in other directories, with different extensions, etc. The problem I encountered is the same as the issue problem mentioned above. The problem is that it has been used for a while, and the background image can be displayed normally before setting up the background image. However, it was probably yesterday that the same bug as the screenshot above appeared. The same path went wrong. I I wonder if it’s the problem with my updated version, my version is Windows Terminal Preview Version: 1.4.2652.0
Author
Owner

@lizilong1993 commented on GitHub (Feb 25, 2022):

I had solved this problem by changing the image path from "D:\\bg.jpg" to "C:\\Users\\xxx\\bg.jpg" . I dont get the point which caused this error...

@lizilong1993 commented on GitHub (Feb 25, 2022): I had solved this problem by changing the image path from _"`D:\\bg.jpg`"_ to _"`C:\\Users\\xxx\\bg.jpg`"_ . I dont get the point which caused this error...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10472