JS utility that replaces images with high-res alternatives