There has been a similar question for icons: https://forum.openstreetmap.org/viewtopic.php?id=68147 Does this help you? As for the pop-up, is functionn with 2 n’s a typo here or in your code?