feat: add SVG image support by kameronbrooks · Pull Request #1115 · scanny/python-pptx

Summary

This PR adds native SVG support to the image insertion pipeline so SVG files can be used with the existing picture APIs.

Reason

PowerPoint supports SVG images natively, but python-pptx did not recognize .svg files or generate the XML required to embed them correctly.

Changes

  • Add SVG content type and extension handling
  • Add SVG-specific image part support
  • Parse SVG dimensions from document metadata
  • Generate native PowerPoint SVG picture XML
  • Route add_picture() and related insertion paths through the SVG flow when the source file is an SVG

Result

SVG images can now be inserted using the existing picture APIs without changing the public usage pattern for raster images.

Changed Files

SlideShapes.add_picture() does not support SVG files #1112