Updating image retrieve logic.