If the code was installed correctly then maybe some settings are set incorrectly. The code should have added some settings to Product information on the product page in the theme editor. Try switching Source reference… to Metafield and not Filename or Alt Text
If that doesn’t work it’s possible the code wasn’t installed correctly. If you wanted the same functionality from an app, I recommend Variant Image Wizard + Swatch https://apps.shopify.com/variant-image-wizard