Preheat oven to 350F / 175C. Grease and line 9x13 inch pan or two 8 inch round pans with parchment paper.
Whisk flour baking powder baking soda and salt in a bowl. Set aside.
Beat butter and sugar on medium high for 4 to 5 minutes until pale and fluffy.
Add eggs one at a time beating after each. Mix in vanilla and coconut extract.
Add dry ingredients in three parts alternating with coconut milk. Begin and end with dry ingredients. Mix just until combined.
Fold in undrained crushed pineapple and shredded coconut with a spatula.
Pour into prepared pan. Bake 38 to 48 minutes for sheet cake or 30 to 38 minutes for round layers. Toothpick should come out with moist crumbs.
Cool in pan 15 to 20 minutes then transfer to wire rack to cool completely.
Beat cream cheese and butter until smooth. Add powdered sugar coconut milk vanilla and salt. Mix until spreadable.
Frost cooled cake and garnish with toasted coconut and pineapple pieces.