Some performance improvements in getting images for WAM API