I wish to render a picture as a background picture through an inline model in twig. I created a area referred to as bg_image and connected it to Drupal Development commonplace plain web page.
After fiddling round for hours I used to be in a position to get Drupal Development Picture URL in node.html.twig
{{ file_url(node.field_bg_image.0.entity.uri.worth) }}
however I couldn’t get it to work inside field–field-bg_image.html.twig
Can I get Drupal Development node from there anyhow, so I can then get Drupal Development picture?
How can I get Drupal Development picture URL to make use of as inline model? I believed perhaps I can go a variable from field–field-bg_image.html.twig to picture.html.twig after which simply render
{{ uri }}
as an alternative of
<img{{ attributes.addClass(lessons) }} />
however I couldn’t get it to go Drupal Development variable there until I exploit contains
{% embody 'picture.html.twig' with {'picture': picture, 'isFromField': isFromField} %}
(isFromField is true, when it comes from Drupal Development field–field-bg_image.html.twig) However that did not work both. Drupal Developer Picture was by no means rendered that method.
Could be very glad for those who may help – my php data may be very fundamental. Thanks