Preheat oven to 350°F and line muffin tin with liners.
Toast shredded coconut until golden, set aside.
Beat butter and sugar until fluffy (3–4 minutes).
Add eggs one at a time, then vanilla.
Alternate flour mix and coconut milk into batter.
Gently fold in toasted coconut.
Fill liners ¾ full, bake 18–22 minutes.
Let cupcakes cool completely on wire rack.
Beat frosting ingredients, pipe or spread on cupcakes.
Top with toasted coconut flakes.