a, Base64-encoded. Otherwise, the image on the page will show up as a &quot;broken image&quot; icon. Here is an example of how to handle image resources:</p>

<pre><code>  use LWP::Simple;
  use MIME::Base64 qw(encode_base64);

  $html-&gt;setHandler (Resource =&gt; sub {
    my ($self,%info) = @_;

    if ($info{tag} eq &#39;img&#39;) {

      # If an http:// link, get the image from the web.
      if ($info{src} =~ /^http/i) {
        my $bin = get $info{src};
        my $enc = encode_base64($bin);
      