I have an entity reference field to Media Video.

I'm trying to get the uri to the video file in node template.

Most of the solution I found around is regarding Image/File. But not Video.

Tried Twig Field Value module but it doesn't work.

4 Answers 4


If you use the media type Video installed by core, you'll find the URL in the field field_media_video_file:

{{ file_url(node.field_media.entity.field_media_video_file.entity.uri.value) }}

To display the raw url of a remote video field in twig (Drupal 9): {{ node.field_media.entity.field_media_oembed_video.0.value }}


to display the raw url of a remote video :

{{ content.field_media_oembed_video.0 }}

I obtained the raw url using the following.


Where field_video_link was my custom field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.