Speed improvements checking images