I'm trying to get Modern Page ListItem icon path for some implementation.
I understand that for SharePoint OnPrem / Online Classic,
it will be located under /_layouts/15/images/<<icon_filename>>
On Modern pages, on inspect element, it shows that the icon is coming from another source. I assume its SPO OOTB CDN.
Let's say txt icon is on
https://spoprod-a.akamaihd.net/files/odsp-next-prod_ship-2017-09-08-sts_20170928.001/odsp-media/images/filetypes/16/txt.png
and list item folder icon is on
https://spoprod-a.akamaihd.net/files/odsp-next-prod_ship-2017-09-08-sts_20170928.001/odsp-media/images/filetypes/16/folder.svg
I worry that the url may change in the future, is there any way to get these URLs programmatically?
var hostURL = //some code refering to https://spoprod-a.akamaihd.net/files/odsp-next-prod_ship-2017-09-08-sts_20170928.001/odsp-media/images/filetypes/16
var fileURL = hostURL + "folder.svg";