Cleanup: move image depth checks in image/ Upstream-commit: 101c749b6533ab309eccea6b6c6173a0c25f787d Component: engine