00405: Image Proxying

Summary: Image Proxying
Created: 2005-03-24 03:15
Status: Closed
Category: Cookbook
From: Uli
Assigned:
Priority: 2
Version: any
OS:

Description: Not sure if this should be "Cookbook" or "Feature Suggestion"...

When writing an image url into a wiki page, the image will be included into the page. Easy to use, perfect.

But there are two issues with that:

  • every time this page is viewed, the local browser will pull the image from the (extern) url, leaving information like referer, client IP and enabling the picture host to store cookies etc.
  • some crazy wiki admins might run their wiki with https. Every https page that includes a http resource will come up with an annoying "this site contains insecure elements...." warning.

Those things are all but wiki bugs. Maybe there is still a chance that there is an elegant solution for that:

Something like a %cache%http://image.url/test.jpg would fopen the remote url and display it in the current protocol (wiki = image server). Also pmwiki would cache the image locally in a dedicated folder.

Uli


If someone is running a wiki with https:, perhaps the image urls ought to be specified using https: also. Beyond that, having the server proxy images increases the bandwidth load a fair bit, not to mention the cost of maintaining another cache. This is definitely something to be done in a cookbook recipe. --Pm