minor mod to make use of jpeg files also

Tested myself and seems ok. Thanks.