Toast the shredded coconut in a dry skillet over medium heat for 3-4 minutes until golden brown, stirring constantly. Set aside to cool.
In a small saucepan, combine sugar, water, and toasted coconut. Bring to a boil, then reduce heat and simmer for 5 minutes. Remove from heat and let steep for 10 minutes, then strain out the coconut, keeping the syrup.
Brew your espresso or strong coffee and divide between two mugs. Stir 2-3 tablespoons of toasted coconut syrup into each mug.
Heat and froth the milk until it reaches 145-150°F and has a creamy foam on top. Add vanilla extract to the milk.
Pour the steamed milk over the espresso mixture, spooning foam on top. Drizzle with additional coconut syrup and top with whipped cream if desired.