Autofit image to webviewer

Here is an example html file
You put this in your assets along with yourimage.jpg

<!DOCTYPE html>
<html>
<head>
<style>
.contain {object-fit: contain;}
</style>
</head>
<body>
<img class="contain" src="yourimage.jpg" alt="AI2" style="width:100%;height:100%">
</body>
</html>

Use the same path blocks as you did just for the image - in your other thread