Implementing a simple image loader to avoid multiple load