IRONSOFTWAREHOME
Add Image
using IronWord;
using IronWord.Models;

// Load docx
WordDocument doc = new WordDocument();

// Configure image
IronWord.Models.ImageContent image = new IronWord.Models.ImageContent("salvatore-tonnara.jpg");
image.Width = 200; // In unit pixel
image.Height = 200; // In unit pixel
Paragraph paragraph = new Paragraph();

// Add image
paragraph.AddImage(image);

// Add paragraph
doc.AddParagraph(paragraph);

// Export docx
doc.SaveAs("save_document.docx");
Imports IronWord
Imports IronWord.Models

' Load docx
Dim doc As New WordDocument()

' Configure image
Dim image As New IronWord.Models.ImageContent("salvatore-tonnara.jpg")
image.Width = 200 ' In unit pixel
image.Height = 200 ' In unit pixel
Dim paragraph As New Paragraph()

' Add image
paragraph.AddImage(image)

' Add paragraph
doc.AddParagraph(paragraph)

' Export docx
doc.SaveAs("save_document.docx")
NuGet Download
PM > Install-Package IronWord
Add Image

Add Image

The code snippet below demonstrates how to load a Word document, configure an image with specific dimensions, and then add this image into the document. A new Paragraph object is created to contain the image, which is added using the AddImage method of the paragraph. This paragraph, now containing the image, is subsequently added to the document using AddParagraph. Finally, the modified document is exported.

Explore Document Elements Tutorial for More Insights.
View on GitHub

Ready to Get Started?

Nuget Downloads 56,401Version: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