outputting image from custom module I am writing a custom module that will output an image on the page. I believe that I should have this image in my module folder and not rely on that image being in the site files. I'm not sure how to reference that image to produce the img tag.
mymodule
-/mymodule.info
-/mymodule.module
-/files
-/files/myimage.png

I want to be able to render the image so that the source is displayed with an img tag:
For outputing image, you should use theme function, with image theming. And path argument inside.

For example:

$img = theme('image', array('path' =&gt; "path to image"));
// $img will containt the image tag.
// path can be relative from drupal root, or it can be 'files' path (public://image.jpg)


Read more about it, you can here: https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_image/7

The power of Drupal in overwriting, so I suggest you to use theme way.