Rim your glass with salt or sugar if desired by running a lime wedge around the rim and dipping it into the salt or sugar.
Fill a cocktail shaker with ice and add tequila, triple sec, pineapple juice, lime juice, and blueberry syrup.
Shake vigorously for about 15 seconds until chilled.
Strain the mixture into a glass filled with fresh ice.
Garnish with fresh blueberries and a pineapple wedge before serving.