Piwigo Bugtracker

Piwigo bug tracker has moved to Github

This bugtracker is kept to provide history on old issues.

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000263Piwigodisplaypublic2006.01.13 00:102015.03.04 10:43
Assigned To 
PlatformOSOS Version
Product Version1.3.4 
Target VersionFixed in Version 
Summary0000263: To speed up dowloading images, especially during slide show

here is an idea to avoid to wait for too long if you don't have a very high speed Internet (that's my case) :
you can preload the next image while the visitor is looking at the current one.

The code I have tried is in the additionnal information.
It works fine (my ADSL is 500 k), but I don't know well your code, and I'm not sure I have seen all the problems it could induce.
It does not suppress the delay for the first image, but for the following ones, it's quicker.

Best regards,


PS :
Je n'ai pas une version récente, alors désolé si une telle fonctionnalité a déjà été intégrée.
En tous cas, merci pour PhpWebGallery, et bonne continuation.
Additional Information3 files are modified : picture.php, header.tpl and scripts.js.
In picture.php :
Add a variable to have the previous and next pictures source name
      'TITLE_IMG' => $picture['next']['name'],
      'IMG' => $picture['next']['thumbnail'],
      'U_IMG' => add_session_id($picture['next']['url']),
      'IMGHS' => $picture['next']['src'],

Same for previous.

Move the line
after setting the data for next and previous.

File header.tpl :
 function phpWGLoadNextPrevious() {
  // first preload next one.
  <!-- BEGIN next -->
  <!-- END next -->
  // preload previous one in case of rolling back visit
  <!-- BEGIN previous -->
  <!-- END previous -->
 <body onload="phpWGLoadNextPrevious()">

File scripts.js : (taken from a preload found on the web)
function phpWGPreLoad()
  var d=document;
      if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=phpWGPreLoad.arguments;
        for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0) {
            window.status = "preloading " + a[i];
            d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
               window.status = "";
TagsNo tags attached.
Database engine and version
PHP version
Web serverApache 1.3.x
Attached Files

- Relationships

-  Notes
plg (manager)
2015.03.04 10:43
edited on: 2015.03.04 10:43

Already implemented in recent Piwigo versions and even better with plugin such as Fotorama.

- Issue History
Date Modified Username Field Change
2006.01.13 00:10 dranreb New Issue
2006.01.13 00:10 dranreb browser => any
2006.01.13 00:10 dranreb Web server => Apache 1.3.x
2006.02.10 02:33 rvelices Status new => assigned
2006.02.10 02:33 rvelices Assigned To => rvelices
2008.07.11 22:08 rvelices Assigned To rvelices =>
2015.03.04 10:43 plg Note Added: 0007777
2015.03.04 10:43 plg Note Edited: 0007777
2015.03.04 10:43 plg Status assigned => closed
2015.03.04 10:43 plg Resolution open => fixed

Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker