Skip to content

Commit

Permalink
Add ImageRun.type for docx 9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
joshkel committed Dec 18, 2024
1 parent 558ad12 commit 7c71c93
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/serializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ export class DocxSerializerState {
new ImageRun({
...imageRunOpts,
data: buffer,
// Assume that the file extension is a valid docx image type.
type: src.replace(/.*\./, '').toLowerCase() as any,
transformation: {
...(imageRunOpts?.transformation || {}),
width,
Expand Down

0 comments on commit 7c71c93

Please sign in to comment.