I have this code to add an image to a page in a custom module.
$build = array( '#theme' => 'image', '#uri' => $uri_nhchart, );
I have searched the API in Backdrop and Drupal 7 to try and find out how to add any attributes to the image, eg 'alt' or 'align' and also a caption. I cannot find out how to do it.
there must be a simple way by adding something like this into the above code....
'#attributes' => array('alt = "Northern Hemsphere Chart"'),
I would really like to be able to add a caption I have to say with the <figcaption> tag for instance.