If second product thumbnail does not exist, zoom on product thumbnail 1

I have some products that do not have a second product image. In this case it will show the “no image” logo.

Is there a script that could say “If no second product image exists, appy this class to the first image” ? Then make a class that is a transform: scale(1.3); so the product would zoom?

This is a page with products with no second image:

https://www.uma-landsleds.com/collections/stickers