I'm not convinced about conditionally including options for config - it could lead to unclear failures if someone sets the option to jpg and later removes PIL, because the error message will just say that jpg is not a valid value. It also means that we import PIL, which AFAIK is a relatively heavy library, even when it's not going to be used. I'd rather have `jpg` as an option all the time, and check for PIL when jpg is specified.