better image cache filename suffix

handle png, jpg, gif