Does Grav CMS have a media library like Wordpress?

Not currently. This could help though: https://github.com/getgrav/grav-plugin-admin/issues/1373


You can create a folder 'images' in your 'pages' folder, and store the images there (you don't have to store the images in a page folder). Then you can display the image like this:

<img src="{{ page.find('/images').media[header.cover].url }}" alt="">

where 'cover' is a custom field added in your front-matter header (put the file name there).