The picture cannot be loaded after angular5 background-img is packaged.

.invoice-img-unselected {
    background-image: url("/assets/imgs/invoice-bg.png");
}

the background image cannot be loaded after being packaged with ng build

clipboard.png

Mar.09,2021

well, this is a path problem, which has nothing to do with packing.
background-image: url (". / assets/imgs/invoice-bg.png") if it is relative to the current file;
otherwise / represents a directory

-- you need to see if there is a picture under the Request URL path, but you haven't asked to see what the problem is.


write relative path.

    background: url(../../assets/imgs/invoice-bg.png)
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3839a-4d795.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3839a-4d795.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?