IRONSOFTWAREHOME
Add Image
using IronPPT;
using IronPPT.Models;

// Create new PowerPoint presentation
var document = new PresentationDocument();

// Add image
Image image = new Image();
image.LoadFromFile("sample.png");
var newImage = document.AddImage(image, 0);

// Edit image's properties
newImage.Position = (200, 200);
newImage.Angle = 45;
newImage.Name = "new image";
newImage.Width = 150;
newImage.Height = 150;

// Export PowerPoint presentation
document.Save("addImage.pptx");
Imports IronPPT
Imports IronPPT.Models

' Create new PowerPoint presentation
Dim document As New PresentationDocument()

' Add image
Dim image As New Image()
image.LoadFromFile("sample.png")
Dim newImage = document.AddImage(image, 0)

' Edit image's properties
newImage.Position = (200, 200)
newImage.Angle = 45
newImage.Name = "new image"
newImage.Width = 150
newImage.Height = 150

' Export PowerPoint presentation
document.Save("addImage.pptx")
NuGet Download
PM > Install-Package IronPPT
Add Image

Add Image

When it comes to PowerPoint presentations, incorporating visuals to illustrate your point with text is a key pillar of expressing your ideas and creating informative content. Adding visuals, such as images, allows users to illustrate points more effectively. Furthermore, the ability to modify and set specific locations on the slide, angles of the image, and dimensions further helps customize the PowerPoint.

With IronPPT, we can do it all within one place, allowing developers to fully customize how they want to place their images on their PowerPoint presentation.

5-Step Code to Add Images

  • Image image = new Image();
  • image.LoadFromFile("sample.png");
  • var newImage = document.AddImage(image, 0);
  • newImage.Position = (200, 200);
  • newImage.Angle = 45;

Code Explanation

To load the desired image, we first instantiate a new Image class, then use LoadFromFile to load the desired image. Afterwards, we add the image to the PowerPoint presentation using AddImage, providing the loaded image as a parameter, as well as the slideIndex. In this example, we are adding the sample.png onto the first Slide of the PowerPoint presentation.

After adding the image, we can specify its location on the slide by assigning the x and y coordinates of the image relative to the slide. In the example, we set x and y to the coordinates of 200.

To further customize and change the angle of the image, we use the Angle property and set the value to 45. We can also set the image's Name, Width, and Height properties to label and resize it as needed.

Finally, we call document.Save("addImage.pptx") to export the updated PowerPoint presentation to a file.

Additional placeholders: LoadFromFile, AddImage, Position, Angle, Name, Width, Height, Save

Learn to Manage PowerPoint Slides with IronPPT.
View on GitHub

Ready to Get Started?

Nuget Downloads 6,070Version:2026.9just released

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required