fixed handling of image files by KnitR