Fix image loading for cross-origin resources