How to get image url in a twig file from a media entity Normally I am able to get an images url by setting the display setting for that field to url and then writing something similar to this in order to print the url


  {{ content.field_image.0['#markup'] }}


However this is not possible in the display settings for a media entity, the only options are -


Rendered entity
Entity ID
Thumbnail
Label


So my question is how to get the url from the image, as I need to use the field as a background image so can't just render it out as normal.
With Twig Tweak module (2.4+) it can be done like this:

{{ node.field_media|file_url }}