fixed logic error in image name computation
added jp(e)g to upload picture label