Best way to use images for Next and Previous links in Wordpress

What’s the best way (or any working way) to use images with the next and previous links in Wordpress. I tried this and it doesn’t work:

<?php previous_posts_link('<img src="<?php bloginfo('template_url'); ?>/images/right-arrow.png">'); ?>

Suggestions on how to address this or fix the code above?

check that you have <?php inside the first <?php
same for closing ?>

previous_posts_link(‘<img src="’. bloginfo(‘template_url’) .‘/images/right-arrow.png">’);