Hi, I have the same problem. Even I added the code in the functions.php and nothing.
If I look at the Inspect option in the browser I see the image, but not showing in the product simple page. I noticed that only happens when the product have a variation.