change fetch image function