image-type-from-file-name fix for bug#9045