title: ACF block moving <style> to <head>
body: <p>I'm using <a href="https://www.advancedcustomfields.com/resources/blocks/" rel="nofollow noreferrer">ACF Blocks</a> on a site I'm building.</p>
  <p>I've registered my block via a plugin, like so:</p>
  <pre><code>&lt;?php
  function acf_blocks() {
      if( function_exists('acf_register_block_type') ) {
          acf_register_block_type(array(
              'name'              =&gt; 'intro-intro',
              'title'             =&gt; __('Page Intro'),
              'description'       =&gt; __('Page intro block'),
              'render_template'   =&gt; plugin_dir_path( __FILE__ ) . 'template-parts/blocks/page-intro/page-intro.php',
              'category'          =&gt; 'formatting',
              'icon'              =&gt; 'editor-textcolor',
              'keywords'          =&gt; array( 'testimonial', 'quote' ),
          ));
      }
  }
  add_action('acf/init', 'acf_blocks');
  </code></pre>
  <p>Here's how it's looking in the <code>page-intro.php</code> template file:</p>
  <pre><code>&lt;?php
  /**
   * Page Intro Block Template.
   *
   * @param   array $block The block settings and attributes.
   * @param   string $content The block inner HTML (empty).
   * @param   bool $is_preview True during AJAX preview.
   * @param   (int|string) $post_id The post ID this block is saved to.
   */
  ?&gt;
  &lt;div class=&quot;page-intro-wrapper&quot;&gt;
      &lt;div class=&quot;page-intro&quot;&gt;    
          &lt;?php
              $title = esc_html( get_field('title') );
              if( get_field('include_intro_text') == 'yes' ) {
                  echo '&lt;h2&gt;'.$title.'&lt;/h2&gt;'; 
                  echo get_field('text');
              }
              else {
                  echo '&lt;h2 class=&quot;no-intro-text&quot;&gt;'.$title.'&lt;/h2&gt;';
              }
          ?&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Here's the field I've created via Field Groups in ACF settings:</p>
  <p><a href="https://i.stack.imgur.com/zrY4y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zrY4y.png" alt="ACF Field Group" /></a></p>
  <p>The block works as expected apart from one thing. I'd like to add a background image to the <code>.page-intro-wrapper</code> class. To do this, I've created the following function within my plugin:</p>
  <pre><code>&lt;?php
  function page_intro_styles() {
      $background_image = get_field('background_image', get_the_ID() );
      ?&gt;
          &lt;style&gt;
              .page-intro-wrapper {
                  background: url( &lt;?= wp_get_attachment_image_src($background_image, 'hero')[0]; ?&gt; );
              }
              @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
                  .page-intro-wrapper {
                      background: url( &lt;?= wp_get_attachment_image_src($background_image, 'hero-2x')[0]; ?&gt; ); 
                  }
              }
          &lt;/style&gt;
      &lt;?php
  }
  add_action('wp_head', 'page_intro_styles');
  </code></pre>
  <p>I was expecting this function to take the <code>$background_image</code> field from my block and display the image URL. The background image isn't showing up.</p>
  <p>Using <code>var_dump($background_image);</code> prints NULL on the front end.</p>
  <p>I've also tried <code>$background_image = get_field('background_image', get_queried_object_id() );</code></p>
  <p>What am I missing here?</p>