1
IMHO a simple answer would be that you should promote something immutable. In the case of images, that’s easy: build an image once then follow the "deploy then test" path to production.
For static content, if you don’t want to or can’t package it up, use something else immutable for your promotion. For example, have you pipeline grab a specific git revision of a code repo, then do your static analysis, linting etc on your static files. Then push that precise git revision to your various non-prod hosting locations through your pipeline on your path to production.
Immutability is the key. Without being certain that you are deploying and testing the same thing in every stage through to production, you don’t know if that production deployment is safe to do.