IRONSOFTWAREHOME

How to Manage Images in PowerPoint

Ahmad Sohail
Ahmad Sohail
Updated: August 2, 2026

Multimedia elements form the integral structure of a PowerPoint presentation. Images, in particular, provide visual context and reinforce the information presented on each slide. Effective image management (whether inserting new visuals, updating existing ones, or cleaning up outdated graphics) is imperative for maintaining professional and scalable presentations.

This guide demonstrates how to work with images programmatically using IronPPT.


Add Image

To add an image in a PowerPoint document using IronPPT, create a new document object (or load from an existing file). Then, create an image object from the Image class that references a file. Once the image is loaded, add it to the document and specify the slide number where it should appear. From there, image attributes can be altered using properties such as Height, Width, and Angle. Finally, export the document with the newly added image.

using IronPPT;
using IronPPT.Models;

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

// Create and load an image from file
Image image = new Image();
image.LoadFromFile("image.jpg");

// Add image to the first slide (index 0)
var newImage = document.AddImage(image, 0);

// Rotate the image 180 degrees
newImage.Angle = 180;

// Save the presentation as a PPTX file
document.Save("adding-image.pptx");
Add image to PowerPoint slide

Image Properties

Explore image property options in the table below.

PropertyDescriptionExample
HeightSets the height of the image in points.image.Height = 300;
WidthSets the width of the image in points.image.Width = 400;
AngleRotates the image by a specified angle in degrees.image.Angle = 45;
PositionSets the position of the image on the slide using x and y coordinates.image.Position = (200, 200);
FrameShapeSets the frame shape of the image using ShapeType enum values.image.FrameShape = IronPPT.Enums.ShapeType.RoundRectangle;

Modifying Added Image Properties

After adding an image to a slide, you can modify its properties to adjust appearance and positioning. E.g., using properties like Height, Width, and Angle to customize the image dimensions and rotation. Tweaking these settings lets you fine-tune how the image appears in your presentation.

using IronPPT;
using IronPPT.Models;
using IronPPT.Enums;

// Load an existing presentation document
var document = new PresentationDocument("existing-presentation.pptx");

// Create and load an image from file
Image image = new Image();
image.LoadFromFile("image.jpg");

// Add image to the second slide (index 1)
var newImage = document.AddImage(image, 1);

// Modify image properties
newImage.Angle = 45; // Rotate the image 45 degrees
newImage.FrameShape = ShapeType.RoundRectangle; // Set the frame shape to Rounded Rectangle
newImage.Position = (180, 180); // Set the position to coordinates (180, 180)
newImage.Width = 300; // Set the width to 300 points
newImage.Height = 300; // Set the height to 300 points

// Save the modified presentation as a new PPTX file
document.Save("modifying-image-properties.pptx");
Modify image properties in PowerPoint

Replace Image

Replacing an image is an intuitive task with IronPPT. First, load the presentation document and your new image into a fresh Image object. Then, target the image you wish to update by selecting its slide and index, such as Slides[0].Images[0] (for the first image on the first slide). Once complete, call the Replace method using the new image object and export the file.

using IronPPT;
using IronPPT.Models;

// Load an existing presentation
var document = new PresentationDocument("sample.pptx");

// Load the replacement image
Image replaceImage = new Image();
replaceImage.LoadFromFile("sample.png");

// Replace the first image found in the first slide
document.Slides[0].Images[0].Replace(replaceImage);

// Save changes (overwriting the original file)
document.Save("sample.pptx");

Original

Replace image on a PowerPoint slide (Before replacement)

Result

Replace image on a PowerPoint slide (After replacement)

Remove Image by Index

The simplest way to remove an image is by its index position. Access the slide's image collection and use the Remove method with the zero-based index of the image you want to delete. This approach works well when you know the exact position of the image in the collection.

using IronPPT;

// Load an existing presentation
var document = new PresentationDocument("real_sample.pptx");

// Remove the first image found on the second slide
document.Slides[1].Images[0].Remove();

// Save the updated presentation
document.Save("removed-image.pptx");
C#

Before Image Removal

Remove image by index from PowerPoint slide (before view)

After Image Removal

Remove image by index from PowerPoint slide (after view)

Removing All Images

For scenarios where there needs to be a bulk deletion for all of the Image files in a document, we can use two for loops: once to iterate through all document pages, and twice to reiterate through and remove all the identified images per page. An example is shown below.

using IronPPT;
using IronPPT.Models;

// Load an existing presentation
var document = new PresentationDocument("real_sample.pptx");

// Remove all images from every slide
for (int s = 0; s < document.Slides.Count; s++)       // Loop through all slides
{
    var slide = document.Slides[s];                   // Get the current slide

    for (int i = slide.Images.Count - 1; i >= 0; i--) // Loop backward through images on this slide
    {
        slide.Images[i].Remove();                     // Remove each image
    }
}

// Save the updated presentation
document.Save("removed-images.pptx");

Before Bulk Deletion

Remove image by index from PowerPoint slide in bulk (before view)

After Bulk Deletion

As you can see, all the images are removed from slides 2 and 4.

Remove image by index from PowerPoint slide in bulk (after view)

Frequently Asked Questions

How do I add an image to a PowerPoint slide using IronPPT?

To add an image using IronPPT, first create or load a PowerPoint document. Create an image object using the `Image` class, load your desired image file into it, and then add this image to a slide using the document's `AddImage` method. You can adjust properties like `Height`, `Width`, and `Angle` before saving the document as a PPTX file.

What operations can I perform on images in a PowerPoint using IronPPT?

IronPPT allows operations such as inserting new images, modifying existing image properties, replacing images, and removing images from a PowerPoint presentation.

Can I modify image attributes once an image is added to a PowerPoint slide?

Yes, once an image is added to a PowerPoint slide using IronPPT, you can modify its attributes such as `Height`, `Width`, `Angle`, `Position`, and `FrameShape` to adjust its appearance and position on the slide.

How is an image replaced in a PowerPoint presentation using IronPPT?

To replace an image in a PowerPoint presentation with IronPPT, load the presentation document and the new image, access the target image via slide and index, and then use the `Replace` method to substitute the new image. Remember to save your changes.

What is the process for removing an image by index using IronPPT?

To remove an image by index in IronPPT, access the slide’s image collection, use the `Remove` method with the image’s zero-based index, and then save the updated presentation.

How do I remove all images from a PowerPoint presentation with IronPPT?

Removing all images from a PowerPoint presentation with IronPPT involves iterating through each slide and using a backward loop to remove each image by accessing them through their index.

Why should I manage images in a PowerPoint presentation programmatically?

Managing images programmatically with IronPPT enhances efficiency, ensures precision in positioning and sizing, and allows for dynamic updates, essential for professional and scalable presentations.

What is the 'Image' class used for in IronPPT?

In IronPPT, the `Image` class is used to create image objects that you can load from files and manipulate by setting different properties before adding them to PowerPoint slides.

Can I export a modified PowerPoint with new images using IronPPT?

Yes, once you've made modifications or additions of images in a PowerPoint, you can export the presentation as a PPTX file using IronPPT, preserving all your adjustments.

What are some common image properties that can be adjusted using IronPPT?

Common image properties include `Height`, `Width`, `Angle`, `Position`, and `FrameShape`, allowing for comprehensive customization of image appearance and placement on slides.

Ahmad Sohail
Full Stack Developer

Ahmad is a full-stack developer with a strong foundation in C#, Python, and web technologies. He has a deep interest in building scalable software solutions and enjoys exploring how design and functionality meet in real-world applications.

...
Read More

Ready to Get Started?

Nuget Downloads 6,070Version:2026.9just released

C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package IronPPT
nuget.org/packages/IronPPT/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronPPT"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

  1. Download and unzip IronPPT to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronPPT.dll"

Licenses from $999

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