Display image and text above form
Example:

 $theme = \Drupal::theme()-&gt;getActiveTheme();    
 $form['image_div'] = array(
 '#prefix' =&gt; '&lt;img src="/' . $theme-&gt;getPath() .'/images/smile.png"&gt;',
        '#suffix' =&gt; '&lt;/div&gt;',
    );