Image renderer and cacher in Erlang