added support for jpeg images