removed replace image function