typpo / chartjs-to-image

Simple library for converting Chart.js to image on backend and frontend
MIT License
46 stars 7 forks source link

Add WebP and AVIF support #24

Open SergeySypalo opened 1 year ago

SergeySypalo commented 1 year ago

Hi Typpo, this time is a feature request from me :) Is it possible to add WebP and AVIF file formats support when exporting images?

typpo commented 1 year ago

Hi @SergeySypalo,

webp is actually supported, although not documented! You can call setFormat('webp')

SergeySypalo commented 1 year ago

Actually I'm more interested in AVIF, as it offers better compression, and the result is sharper. At least for images I need/tested.