qax-os / excelize

Go language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
https://xuri.me/excelize
BSD 3-Clause "New" or "Revised" License
17.64k stars 1.69k forks source link

Is webp (image format) supported? #1839

Closed yunbai002 closed 4 months ago

yunbai002 commented 4 months ago

Is webp (image format) supported?

WellOptimized commented 4 months ago

webp is not supported currently, excelize only supports these image types:


var supportedImageTypes = map[string]string{
    ".bmp": ".bmp", ".emf": ".emf", ".emz": ".emz", ".gif": ".gif",
    ".jpeg": ".jpeg", ".jpg": ".jpeg", ".png": ".png", ".svg": ".svg",
    ".tif": ".tiff", ".tiff": ".tiff", ".wmf": ".wmf", ".wmz": ".wmz",
}
yunbai002 commented 4 months ago

webp is not supported currently, excelize only supports these image types:

var supportedImageTypes = map[string]string{
  ".bmp": ".bmp", ".emf": ".emf", ".emz": ".emz", ".gif": ".gif",
  ".jpeg": ".jpeg", ".jpg": ".jpeg", ".png": ".png", ".svg": ".svg",
  ".tif": ".tiff", ".tiff": ".tiff", ".wmf": ".wmf", ".wmz": ".wmz",
}

@WellOptimized Thanks for the reply. Is there any plan for this?

xuri commented 4 months ago

Thanks for your issue. If you insert WebP files into your Office app, the Office app will convert it to PNG format, so there is no plan to add support for this. Please convert the picture to a supported image format before inserting it. I've closed this. If you have any questions, please let me know, and you can reopen this anytime.