How do I reference a variable/expression inside an expression in twig templating? This is the desired code

&lt;img src="{{ asset.getUrl('newsImageHalfWidth') }}"&gt;


Which works. However I want the transform name to be replaced by the contents of 

entry.newsImageSize


So in a kind of pseudocode it would be

&lt;img src="{{ asset.getUrl('{{entry.newsImageSize}}') }}"&gt;


which of course does not work.
With Twig, you'll never need to nest tags within other tags. In fact, it's impossible to do.

You can simply pass your variable into getUrl instead of using a string.

&lt;img src="{{ asset.getUrl(entry.newsImageSize) }}"&gt;