- Piwigo – Ctrl Refresh Images Don’t Load Problem Solved
- How Did We Get From’ “My Damn Pages Don’t Load” to “Look- A Hyena With A Giraffe Leg”?
One of the most recommended open source Photo Imaging Content Management Systems is Piwigo.


On my Piwigo installation at Straton.org.za I kept experiencing a minor niggle which became a major niggle the more I hit Cmd R (Ctrl F5 for the peasants) to force the loading of images and thumbnails in my browser after uploading images to the Piwigo installation.
Anyway using Google to find a solution to “Piwigo: my images not loading” eventually led me to the solution which is all around SSL, Port 80 and Port 443. It would appear that this is a legacy issue from the days when one could choose to either use http or the more secure https protocol. A number of solutions were proposed in the Github forums.
The most elegant solution for me was proposed by user Pierrick Le Gall and involved the following steps:
- Open your Piwigi Public_html folder on your server
- Find the Include folder and open it
- Open the functions_url.inc.php file
- Find lines 64 to 72 and comment each one out (adding // before each line does so)
- Save
- Check
To re-iterate:
Find these lines in functions_url.inc.php:
if ( (!$is_https && $_SERVER[‘SERVER_PORT’] != 80)
||($is_https && $_SERVER[‘SERVER_PORT’] != 443))
{
$url_port = ‘:’.$_SERVER[‘SERVER_PORT’];
if (strrchr($url, ‘:’) != $url_port)
{
$url .= $url_port;
}
}
Comment the above lines out like so:
// if ( (!$is_https && $_SERVER[‘SERVER_PORT’] != 80)
// ||($is_https && $_SERVER[‘SERVER_PORT’] != 443))
// {
// $url_port = ‘:’.$_SERVER[‘SERVER_PORT’];
// if (strrchr($url, ‘:’) != $url_port)
// {
// $url .= $url_port;
// }
// }
You could also delete the lines – I prefer to comment out just in case I want to undo/change at a later stage after any updates.
See video below for visual representation of the process.
[embedded content]
Boilerplate and Editor’s Notes.
More Info on Don’t Be Distracted by the Hyena With A Giraffe Leg here:
Twitter: https://twitter.com/MyPE
CLICK HERE to submit your press release to MyPR.co.za.

Experience It Durbs