Fixes #8036: Validate images and tags