Add if statement to prevent image display in no-graphic mode

This should fix the failing RenderImages script in the CI job