[GH-ISSUE #500] Feature request: add image support webp format #390

Closed
opened 2026-05-05 12:14:28 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @PogiLong on GitHub (Dec 25, 2025).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/500

Originally assigned to: @jmcnamara on GitHub.

Originally created by @PogiLong on GitHub (Dec 25, 2025). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/500 Originally assigned to: @jmcnamara on GitHub.
Author
Owner

@jmcnamara commented on GitHub (Jan 5, 2026):

The webp image format can't be supported by libxlsxwriter because it isn't, strictly speaking, supported by Excel.

Recent versions of Excel allow you to import *.webp images but it converts them to *.png files on the fly and it doesn't store or render the webp file.

Here for example is an unzipped Excel file with a webp image (note that the media entry refers to a png file):

$ ./xunzip webp.xlsx
Archive:  webp.xlsx
  inflating: webp/[Content_Types].xml
  inflating: webp/_rels/.rels
  inflating: webp/xl/_rels/workbook.xml.rels
  inflating: webp/xl/workbook.xml
  inflating: webp/xl/drawings/drawing1.xml
 extracting: webp/xl/media/image1.png
  inflating: webp/xl/styles.xml
  inflating: webp/xl/drawings/_rels/drawing1.xml.rels
  inflating: webp/xl/theme/theme1.xml
  inflating: webp/xl/worksheets/sheet1.xml
  inflating: webp/xl/worksheets/_rels/sheet1.xml.rels
  inflating: webp/docProps/app.xml
  inflating: webp/docProps/core.xml

As such you will need to convert any webp images to a format that Excel (and XlsxWriter) supports like png or jpg.

Closing as can't/won't fix.

<!-- gh-comment-id:3710179097 --> @jmcnamara commented on GitHub (Jan 5, 2026): The webp image format can't be supported by libxlsxwriter because it isn't, strictly speaking, supported by Excel. Recent versions of Excel allow you to import `*.webp` images but it converts them to `*.png` files on the fly and it doesn't store or render the webp file. Here for example is an unzipped Excel file with a webp image (note that the media entry refers to a `png` file): ``` $ ./xunzip webp.xlsx Archive: webp.xlsx inflating: webp/[Content_Types].xml inflating: webp/_rels/.rels inflating: webp/xl/_rels/workbook.xml.rels inflating: webp/xl/workbook.xml inflating: webp/xl/drawings/drawing1.xml extracting: webp/xl/media/image1.png inflating: webp/xl/styles.xml inflating: webp/xl/drawings/_rels/drawing1.xml.rels inflating: webp/xl/theme/theme1.xml inflating: webp/xl/worksheets/sheet1.xml inflating: webp/xl/worksheets/_rels/sheet1.xml.rels inflating: webp/docProps/app.xml inflating: webp/docProps/core.xml ``` As such you will need to convert any webp images to a format that Excel (and XlsxWriter) supports like `png` or `jpg`. Closing as can't/won't fix.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/libxlsxwriter#390
No description provided.