Adding rewind to allow image data to be extracted properly

When the rewind is not present the mime type comes back as application/empty.