Make sure image file is seeked to the start before reading it