Stick index.cgi
in a directory with +ExecCGI
Make a directory to save the cached images to and set it in the my $cachedir
variable.
To view and cache an image, browse to https://{your.host}/cgidirectory/index.cgi?{id}.{ext}
Example: https://i.imgur.com/aaa8x.gif --> https://your.host/cgi-bin/index.cgi?aaa8x.gif
-
Set ignore on placeholder image for removed images and return error rather than caching it.
Example:aaaa2.jpg --> removed.png
andmd5sum
isd835884373f4d6c8f24742ceabe74946
-
Add nesting to cache directory structure.
-
Add check cache for existing media and serve original or get suited format (jpg, png, gif, gifv, mp4) Exmaple
aaa8x.jpg
-->aaa8x.gif
oraaa8x.mp4