Cut fresh pineapple into small chunks, removing the core completely. Smaller pieces blend more smoothly and evenly. If using frozen pineapple, let it thaw slightly for easier blending.
Add pineapple, coconut milk, sugar, lime juice, vanilla, and salt to the blender. Blend until completely smooth and creamy. Taste the mixture and adjust sweetness if needed before freezing.
Pour the mixture into a freezer-safe container and cover tightly. Freeze for several hours, stirring every 30 minutes if not using an ice cream maker. Once firm, fold in coconut flakes and freeze until scoopable.