This seems terribly wasteful, to always open and read the unknown image (and potentially in the wrong size!) on every request.