I want to replace the default media gallery on a products page with a custom viewer. For now this can just be a custom html tag. In addition i want to achieve this using an app so the solution can be used across multiple shops without having to edit the shops theme directly each time.
The current solution i have found is using an app embed with some javascript attached to it searching for the product media gallery using its css class and replacing the html tag once found. This seems like a suboptimal solution.
Are there other ways this could be achieved?
TLDR:
What is the best way using an app or theme extension to replace the product images with a custom viewer?