Due to PIL's 65,500 pixel limitation to an image dimension, the 4096 height thumbnail cannot be generated for images with a w:h aspect ratio greater than 15:1 (4069 * 16 = 65,536)
The result is an exception thrown by PIL when attempting to save the generated 4096 image.
Recommended either better error reporting (e.g. inform the user to restrict images to < 15:1). Or, depending on implications for display, perhaps limit thumbnail dimensions explicitly to < 65,000.
Current workaround is for the user to ensure uploading only images with aspect ratio of 15:1 or less.