> What about using a data url?
Data URIs (they aren't URLs, but that's pedantry) for images means
either using pct-encoding (e.g., %20) or base64 — both of which are
vastly inefficient, and whose bandwidth usage will outweight any gain
by caching. Then you have the problem of IE < 8.
--
Geoffrey Sneddon
<http://gsnedders.com/>
If you don't want to create your own cache of the image files, you
would need to do a proxy of sorts. Your plugin would basically add a
rewrite rule then echo the appropriate Cache::get call for the
requested uri. So you might have /latex/some-hash-string.png, and
plugin retrieve 'some-hash-string' from cache. This means for every
request you load Habari twice, which is not great...
The other way, as I mentioned, is to create your own cache dir and
save the generated images there, linking to them directly, thus not
loading Habari twice.
note: You SHOULD NEVER NEVER NEVER link directly to habari's FileCache
data; in fact on my server I set cache dirs to a non-public facing
folder (not in docroot)... in my case define('FILE_CACHE_LOCATION',
'/var/www/mattread/cache/habari/'); in config.php.
--
Matt Read
http://mattread.com