Q:

How to replace gallery images while keeping them in the image search results? 

I have an old gallery on my website that has indexed images on search engine results for specific keywords.  I would like to replace the image that appears on the search engine results with a new one without losing the image ranking and the link that leads to it. 
Is it good practice to replace images with new ones while keeping the image name?  If not, what is the best approach to achieve this? 

A:

Method 1:
You can load new images on the server with the same file name and same location (Overwrite) and Google will automatically update the image in the index. 
Method 2:
If you need to keep different filename or different image path then you need to set 301 redirections from old image URL to new Image URL. 
Redirection: It will help to retain the ranking but you also need to understand the impact of your new graphic and the impact to user and eventually the ranking.