Correct way to hardcode an image into a parent theme file?

If you check the Codex, the use of get_bloginfo() for certain parameters is discouraged:

  • stylesheet_url’ – Returns the primary CSS (usually style.css) file URL of the active theme. Consider using get_stylesheet_uri() instead.
  • stylesheet_directory’ – Returns the stylesheet directory URL of the active theme. (Was a local path in earlier WordPress versions.) Consider using get_stylesheet_directory_uri() instead.
  • template_url’ / ‘template_directory’ – URL of the active theme’s directory (‘template_directory’ was a local path before 2.6; see get_theme_root() and get_template() for hackish alternatives.) Within child themes, both get_bloginfo(‘template_url’) and get_template() will return the parent theme directory. Consider using get_template_directory_uri() instead (for the parent template directory) or get_stylesheet_directory_uri() (for the child template directory).

So, the answer to your question is that bloginfo('template_directory') is not best practice. Use one the functions listed in Codex instead– get_template_directory_uri() or get_stylesheet_directory_uri()

I consider using bloginfo() as you have in the first block of code to be a kind of quasi-deprecated usage. There are functions in place to replace that usage but that being the case or not why add the overhead of get_bloginfo() when you can call the appropriate functions directly, and are told to do so by the Codex itself?