Applying paxed's patch. "This diff makes the image size cache in mapc