We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Adding images to a pptx

We are using version of Aspose.Slides and would like to add images to a pptx. We know how to do this for a ppt but cannot figure out how or whether this can be done for a pptx under version Does anyone know if this can be done under and where we can find instructions to do so?



Thanks for using Aspose.Slides.

We regret to inform you that adding images to a .pptx is not available in Aspose.Slides 2.8.4. You can use this feature from Aspose.Slides 3.1.7 and newer versions.

In case of Aspose.Slides 3.1.7 you can use following code snippet for adding images to a pptx.

int index = sld.Shapes.AddPictureFrame(ShapeTypeEx.Rectangle, 0, 0, 200, 200, null);
PictureFrameEx picf = (PictureFrameEx)sld.Shapes[index];
picf.PictureFormat.Picture.Url = "test.jpg";

We highly recommend you to upgrade your application to the latest version: Aspose.Slides for .NET5.9.0

In case of Adding images to a pptx while using latest version you can follow this link

We apologize for your inconvenience.