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

Free Support Forum - aspose.com

How to Insert Image or Video as Link (not embed) into a Placeholder?

Powerpoint has a feature of inserting media picture or video as a link.
But I don’t find such a feature in aspose slides.

I see that you have sample code for inserting image into PictureFrame and Video into VideoFrame, but this embeds the picture or video into the PPTX file and makes its size very large.

I want to insert a image or a video but not embed it into the pptx file but only insert it as a link.
Also I want to do this to a existing placeholder on a slide.
The placeholder maybe of type picture, media or object.

Is there any sample code that I missed?
Language would be C#.

Thank you for posting the query. We will reply to you as soon as possible.

You can set any link into placeholders just like other shapes as shown below:

placeholderShape.HyperlinkClick = new Hyperlink("https://www.mysite.com/test.jpg");
placeholderShape.HyperlinkClick.Tooltip = "This is the link to an image.";

Documents: Manage Hyperlinks
API Reference: IShape Interface | IHyperlink Interface

If you mean otherwise, please share a simple presentation with an example.

Like I said I don’t want a hyperlink. I want to insert an image or video as a link (without embedding) it in the Powerpoint file.

I want to do this to a existing placeholder on a powerpoint slide.

Picture is attached of how to do it by gui in Powerpoint, I want to achieve the same thing with C# code .

Link to picture for placeholder.png (80.5 KB)

Thank you for the additional information.

Unfortunately, I was unable to find a way to create such a link by using Aspose.Slides. I logged the issue with ID SLIDESNET-42915 in our tracking system. Our development team will investigate this case. We will reply to you as soon as possible.

Our development team has investigated the issue. After something is inserted into a placeholder in PowerPoint, it is replaced with a shape of the appropriate type. You can perform the same way as shown below:

using (var presentation = new Presentation("input.pptx"))
    var shapesToRemove = new List<IShape>();
    int shapesCount = presentation.Slides[0].Shapes.Count;

    for (var i = 0; i < shapesCount; i++)
        var autoShape = presentation.Slides[0].Shapes[i];

        if (autoShape.Placeholder == null)

        switch (autoShape.Placeholder.Type)
            case PlaceholderType.Picture:
                var pictureFrame = presentation.Slides[0].Shapes.AddPictureFrame(ShapeType.Rectangle,
                        autoShape.X, autoShape.Y, autoShape.Width, autoShape.Height, null);

                pictureFrame.PictureFormat.Picture.LinkPathLong =


            case PlaceholderType.Media:
                var videoFrame = presentation.Slides[0].Shapes.AddVideoFrame(
                    autoShape.X, autoShape.Y, autoShape.Width, autoShape.Height, "");

                videoFrame.PictureFormat.Picture.LinkPathLong =

                videoFrame.LinkPathLong = "https://youtu.be/t_1LYZ102RA";


    foreach (var shape in shapesToRemove)

    presentation.Save("output.pptx", SaveFormat.Pptx);

Documents: Picture Frame, Video Frame
API Reference: PictureFrame Class | VideoFrame Class