Home > Net >  how optimize website that have many images and large video in front-end ( Angular )?
how optimize website that have many images and large video in front-end ( Angular )?

Time:12-16

i have angular website with many images and videos , how optimize these images and videos to make a good performance

i have videos with size 8MB and this make website load slowly

CodePudding user response:

Compress the images. For the video, use the preload="none" attribute.

CodePudding user response:

Load youtube video only when user clicks on it. Because the user of your website can even doesn't click on your video, so it logically to download it when user clicks on it. For that use this script https://github.com/pepelsbey/playground/blob/main/12/video.js

  • Related