First, preheat the oven to 350º. Then, prep your cupcake pan with muffin tins. In a large bowl, combine flour, baking powder, and salt and combine well. Also, in a saucepan, combine juice from 2 lemons and 3 sprigs rosemary, and simmer the mixture on low for 20 minutes.
Now, in a stand mixer, add in the softened butter and cream until it is smooth. Then, add in the sugar and cream again until the butter is smooth. This is an important step, so do not stop creaming until smooth.
Next, add in the vegetable oil and vanilla, and mix until well combined. Then, slowly add in the eggs one at a time, continuing to mix until well combined.
Then, slowly add in half of the dry flour mixture and mix on medium until well blended, continually scraping the sides down to ensure all the ingredients are well incorporated. Next, add in the milk and mix until it is well combined, if the batter curdles a little this is okay and normal. Then, add the rest of the dry ingredients, and mix until completely combined, again scraping down the sides to ensure all the ingredients are well combined.
Next, dump the raspberries into the batter, and fold the raspberries slowly into the batter using a silicone spatula.
Then, fill each muffin tin 2/3 full, and bake the cupcakes in the oven for 15-18 minutes. When you remove the cupcakes, immediately place them on a cooling rack to cool.
Frosting
First, cream the butter until it is completely smooth in a stand mixer, and begin adding in the powdered sugar one cup at a time. Then, pour the lemon thyme mixture into the frosting. Sprinkle salt and pour the vanilla into the frosting, and mix until completely smooth.
Place the frosting into a piping bag with star tip (or tip of choice), and pipe the frosting on by starting in the middle of the cupcake and swirling out and then swirling back in to the top, coming to a point.
Notes
One of the biggest tips for baking these cupcakes is to make sure you cream your butter and sugar. Equally, mix your ingredients very well in between each step.