Use this function to output any image of the site (added trough media library) using its link:

You can set any size you want by alias for the result image, for example: '800x600', but this should be always less or equal to the size of the original image, + be attentive with image proportions.

Useful for MDTF templates or any another custom tasks.