Adding support for jpg images