How to make the image change based on product variant?

I am also having a problem with this!