Update main.js

Image and video formatting. Better?