Refs #16802 - Add possibility to get fallback img tag

- Add possibility to get chart fallback html img tag instead of PNG image.
- Also if request param safe is False do not return the generic preview.