Calendar Image Attribute Output (version 9)

Hi, I am sure I have searched this up before but what code change is required to get the calendar image attribute to output on the event detail page?
The image alt tag appears in the code as required but I can’t get the image to output.

This is what I used to use

    <?php

            $img = $event->getAttribute('event_large_image');
     
            if ($img) {
                
            $tag = Core::make('html/image', 
            array($img))->getTag();
            $altText = $img->getTitle();
            $tag->alt(h($altText));
                
            echo $tag;
    
            }

    
  ?> 

I have searched this up but have failed to resolve this.

I tried to apply what was discussed here but can’t seem to get it to work.
https://forums.concretecms.org/t/concrete-9-0-rc3-image-thumbnail-not-displaying-on-page/930

Thanks in advance

You’re missing code.

`$img = $event->getAttribute(‘event_large_image’);

        if ($img) {
            
        

        $tag = Core::make('html/image', array('f' => $img));

`

Thank you for your help but I am getting the error message:

Object of class Concrete\Core\Html\Image could not be converted to string

This was the code I used…


            $img = $event->getAttribute('event_large_image');
     
            if ($img) {
                
            $tag = Core::make('html/image', array('f' => $img));
            $altText = $img->getTitle();
            $tag->alt(h($altText));
                
            echo $tag;
    
            }

This is how I solved it…

    <?php

            $img = $event->getAttribute('event_large_image');
     
            if ($img) {
                $tag = Core::make('html/image', array('f' => $img))->getTag();
                $altText = $img->getTitle();
                $tag->alt(h($altText));
                echo $tag;
            }

            
    ?> 

I missed off " ->getTag(); "