1

Why I can't use {{ file_url(node.field_image.0.entity.uri.value) }} in my custom view enter image description here

The result not like /drupal-8.6.1/sites/default/files/2018-10/gen9C52.tmp.jpeg

  • You could set your view display to use a custom view mode (as opposed to fields) and then you would have full access to the node object. Then you can use "node view" templates for your view using your standard Twig node theming that you're probably used to. – Danny Englander Oct 30 '18 at 18:16
1

Why I can't use {{ file_url(node.field_image.0.entity.uri.value) }} in my custom view

Simply because your view does not have access to the node variable object.

You can use Image URL Formatter module. Then add your image field and for formatter select Image URL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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