There is a good jquery-lightbox script. But he does not do very well with high-resolution images (we are talking about screenshots of various texts - such images are very large in height and, accordingly, the image file weighs decently). Such a script loads for a very long time, and does not even process such images at all. Please advise an alternative solution.

  • In order to load faster, you must either “compress” the images on the server and give a smaller copy, or save the images as progressive jpeg. - RubaXa
  • @RubaXa Pressing images is not an option, because There are already a lot of them and re-saving each will be time consuming. I need to pick up the script - Bandicoot87
  • 2
    @Oleg Serebryakov, no script can do anything for you, I even tried to load the image through xhr for the sake of interest and draw the resulting part on canvas on onprogress, it is even slower than the usual download. In your place, you would make the /get-progressive-jpeg.php?file=... script that would convert and give the desired image (the result can be cached). - RubaXa

2 answers 2

Loading slowly? So it can depend on the speed of the Internet connection (the images do not weigh a couple of Kb ). In addition, popular plug-ins contain a lot of various functions that you may not need for a particular job, but also sometimes give a significant load. Also, plug-ins often adjust the size of a large image to the size of the viewing area of ​​the screen, which is not necessary for your task. In such a situation, for me personally, there would be one single solution: write such a plugin itself, containing only the functionality that is needed for the task and not a line more. I assure you that, compared to most ready-made solutions, your own version can weigh several times less and process images much faster.

PS When I am too lazy to write myself, I use FancyBox 2 , but I have not tested it on very large images.

    colorbox