在圖片的絕對路徑前面加“file:”就好了。
可以參考:https://blog.csdn.net/major_out/article/details/66971188?utm_source=debugrun&utm_medium=referral