Preheat the oven to 350°F (175°C) and prepare your cupcake pan with liners.
In a mixing bowl, cream together the softened butter and sugar until light and fluffy.
Add eggs one at a time, mixing well after each addition, then stir in the vanilla extract and crushed pineapple.
In a separate bowl, whisk together the flour, baking powder, baking soda, and salt.
Gradually add the dry ingredients to the wet mixture, alternating with milk if using, until fully combined.
Divide the batter evenly among the prepared cupcake liners, filling each about 2/3 full.
Bake in the preheated oven for 18-20 minutes or until a toothpick inserted comes out clean.
Allow the cupcakes to cool in the pan for about 5 minutes before transferring them to a wire rack to cool completely.
While the cupcakes cool, prepare the frosting by whipping together heavy cream, powdered sugar, and crushed pineapple until fluffy.
Frost the cooled cupcakes generously with the pineapple cream frosting, using a piping bag or a spatula.
Garnish with a sprinkle of crushed pineapple or coconut flakes if desired, then serve and enjoy!