How to render a background with a transparent environment hdri

The background images section of the n-panel is only used to add references to your scene. The pictures displayed this way can’t be rendered.

The easiest way to get the picture you want in the rendered version of your scene is to add it as a texture mapped plane and re-position it to face the camera. This is easy to do using the import images as planes addon. Go to File > User Preferences > Add-ons, search for images as planes, and enable it.

Alternatively, you can use cdog’s node setup. The link to the blend file you posted expired, so I’ll just recreate it and send you that blend file instead:example.blend (7.3 MB)