Displaying inline SVG Image field in Twig template

Created on 15 January 2022, almost 3 years ago
Updated 22 May 2024, 7 months ago

I have 2 paragraphs in drupal as follows.

P1

Type of Field
paragraph reference field

Machine name
field_image_text_content_ref

P2

Type of Field
SVG IMAGE

Machine name
field_svg_image

I am referring to P2 inside P1 and creating a twig template of P1. I want to get the whole HTML of the SVG field which i am getting in normal display at front end.

On doing the below thing,

paragraph.field_image_text_content_ref.entity.field_svg_image

I am getting the field as array object but i need the whole HTML(including values and SVG tag itself) of SVG field in twig template for P1.

Let me know if anyone has any inputs.

🐛 Bug report
Status

Closed: works as designed

Version

2.3

Component

Miscellaneous

Created by

🇮🇳India rajat_21

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024