Adds Jason Sherman's scaled image optimizations