better image cache key generation, work nicely with filename