Explanation of the Secure Image Proxy feature::
If a phpBB board is served from a https:// server, all of the locally hosted content will be served over https:// and a browser will report it as a secure site, but any BBCode [IMG] links posted by users pointing to http://... will appear to browsers to be insecure content, in some browsers promoting a security warning dialogue, and in other browsers resulting in the image becoming inaccessible. It has been reported that insecure content has a negative impact on Google SEO.
An accepted solution for fixing mixed external content is to use a SSL proxy server to make the images appear to be secure. Camo is an example of such a proxy.
With this extension installed, when a phpBB page is being loaded by a user, [IMG] links to http://... images are rewritten by the phpBB renderer so that they become https:// links to the ssecure proxy server, with the original link address encoded into the new link. The user's browser then requests the image from the secure proxy which accesses the original hosting server and re-serves the content on-the-fly using the https:// protocol.
As it is assumed that the server hosting the phpBB board is able to support the https:// protocol, any http://... [IMG] links to the server hosting the phpBB board will be directly re-written to access the original server via https:// bypassing the camo proxy.
This phpBB extension does not supply the actual proxy service, you will need to install camo separately outside of phpBB (but perhaps on the same server), or use another SSL proxy service.
Explanation of the Local Image Store feature feature:
Some phpBB forums (particularly those which have been around for several years) have a large number of posts which contain inline images linked using the BBCode [IMG] tag. Over time a proportion of these images suffer "link rot" and disappear from the forum because the image is removed from the original external host, or the original host goes permanently off-line. This can cause significant anguish to users who expect the forum to provide a lasting historical record.
In some cases the images can be re-hosted or uploaded as attachments to the forum, but often this does not happen because the original poster has moved on (in one sense or another) or no copy of the image can be found for re-hosting. We have taken the approach of making a backup copy of all externally-hosted in-line images on our forum, which are saved to a local server directory.
This extension provides the last linkin the chain by redirecting external [IMG] tags to the locally hosted copy. If there is no locally hosted copy, the original link is used.
History of this extension:
This extension started life in 2016 as an attempt to improve the phpBB/sslAssets
extension for redirecting http:// image links to a camo proxy server by adding configurability via the ACP. See v12mike/camosslimageproxy
. After that extension was declared abandoned, I just used it on my own forums.
Then when Photobucket started hiding images that users had linked to our forums, I wrote some scripts
that harvested externally hosted images for local storage. To display these local images, I added an extra mode to my existing extension and renamed it to Image Redirect. A number of forums have to my knowledge been using v1.x of this extension since then.
The original phpBB/sslAssets extension and v1.x of this extension worked by parsing the html output of the phpBB renderer, looking for html code that the renderer would bave produced from a BBCode [IMG] tag. While working on an idea for a different extension, I became more familiar with the s9e parser/renderer introduced into phpBB v3.2 and it became obvious that it would be more efficient to re-implement this extension to hook into the renderer, avoiding the html parsing operation. That rework has become v2.0 of this extension, and I thought it worth publishing it here.