Can both my flag as well as unflag text have different background images?
You can use a preprocess function to override the output as a span with classes. 

function MYMODULE_preprocess_flag(&amp;$variables) {
  $flag = &amp;$variables['flag'];
  $action = $variables['action'];
  if ($flag-&gt;name == 'drupal_like') {
    if ($action == 'flag') {
      $variables['link_text'] = '&lt;span class="flag flag-heart-light"&gt;&lt;/span&gt;';
    }
    else{
      $variables['link_text'] = '&lt;span class="flag flag-heart-dark"&gt;&lt;/span&gt;';
    }
  }
}


Then you can target these classes to write your css as David mentioned.

.flag-heart-dark{
  background: transparent url('images/flag.png') no-repeat;
}

.flag-heart-light{
  background: transparent url('images/unflag.png') no-repeat;
}