Rinse the blueberries and set aside.
In a medium saucepan, whisk together sugar, cornstarch, and salt.
Gradually whisk in milk until smooth.
Add the blueberries to the saucepan and stir to combine.
Cook over medium heat, stirring constantly, until the mixture comes to a boil and thickens.
Remove from heat and stir in butter and vanilla extract.
Pour the pudding into individual serving dishes or a large bowl.
Cover with plastic wrap and chill in the refrigerator for at least 2 hours.
Serve cold, with whipped cream if desired.