The onBeforeCellExport event is fired during image export. It allows you to provide alternative text for the Gantt Chart grid cells (image export doesn't support HTML in grid cells).
Available since version 2023.1.5529.
DayPilot.Gantt.onBeforeCellExport(args);
Basic HTML to text conversion - replaces line breaks:
dp.onBeforeEventExport = function(args) { args.text = args.e.client.html().replace("<br>", "\n"); };