Ability to specify a shortcode / function as the dynamic source for an image

Title says it all really, as an example this is extremely useful if you have dynamically generated images in a query based on certain fields.