# Convert JPG to PPT in PHP

> Convert a JPG image to PowerPoint PPT in PHP with Aspose.Slides for PHP via Java.

Source: https://products.aspose.com/slides/php-java/conversion/jpg-to-ppt/
Updated: 2026-07-31



## Convert JPG to PPT in PHP

[**Aspose.Slides for PHP via Java**](/slides/php-java/) lets you place a JPG image on a presentation slide at its original dimensions and save the result as a PowerPoint 97–2003 PPT file.

Aspose.Slides can save JPG-based slides as PPT, PPTX, PDF, HTML, and other supported formats.

## Convert JPG to PPT using PHP

To convert JPG to PPT, create a `Presentation`, add the image with `addPictureFrame`, and call `save` with `SaveFormat::Ppt`.

### PHP code for converting JPG into PPT

```php
$presentation = new Presentation();
try {
    $slide = $presentation->getSlides()->get_Item(0);

    $sourceImage = Images::fromFile("input.jpg");
    try {
        $embeddedImage = $presentation->getImages()->addImage($sourceImage);
    } finally {
        $sourceImage->dispose();
    }

    $imageWidth = java_values($embeddedImage->getWidth());
    $imageHeight = java_values($embeddedImage->getHeight());

    $slide->getShapes()->addPictureFrame(
        ShapeType::Rectangle, 0, 0, $imageWidth, $imageHeight, $embeddedImage);

    $presentation->save("output.ppt", SaveFormat::Ppt);
} finally {
    $presentation->dispose();
}
```

## How to convert JPG to PPT using Aspose.Slides for PHP API

These are the steps to convert JPG to PPT in PHP.

Install [**Aspose.Slides for PHP via Java**](/slides/php-java/).

Configure Aspose.Slides in your PHP project.

Create a `Presentation`, access its first slide, and load the JPG file with `Images::fromFile`.

Add the JPG image with `addPictureFrame`, then save the presentation with `SaveFormat::Ppt`.

## Convert JPG To Other Supported Formats

- [JPG TO HTML](/slides/php-java/conversion/jpg-to-html/)
- [JPG TO IMAGE](/slides/php-java/conversion/jpg-to-image/)
- [JPG TO PNG](/slides/php-java/conversion/jpg-to-png/)
- [JPG TO PDF](/slides/php-java/conversion/jpg-to-pdf/)
- [JPG TO PPTX](/slides/php-java/conversion/jpg-to-pptx/)
