Media in Twig template

Oh! Thanks. I was following the docs at http://learn.getgrav.org/content/media which just have {{ media…

Also, is there no way to resize and cache an arbitrary image?
Nothing like {{ media[’/static/img/sample.jpg’].resize(300).url }} will work?

For example, I have a static folder with about 300 photos… I’d like to run programmatically over metadata in a page header and resize from there.