a couple image optimizations