Icon generation for images and videos