Fix compatibility with Pyramid 1.4

This comes at the cost of Pyramid 1.5 compatibility, but 1.4 is the
latest stable version.
Show preview of registered image
Allow compatibility with Pyramid 1.4 and 1.5