Can you automatically take an image of a chart and attach it to a record?

I think there’s some way to make the drop down menu do this instead of showing the drop down menu. You can add an onclick function to it, and even change the icon

https://api.highcharts.com/highcharts/exporting.buttons.contextButton