Handle JPEG images without PIL

This change enables insertion of JPEG images without PIL.  Test output was the same before and after.  Let me know if you have any questions.