strip error messages for image files, requested by @whs