PHPackages                             joshuaadickerson/scene7 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. joshuaadickerson/scene7

ActiveStandard[Image &amp; Media](/categories/media)

joshuaadickerson/scene7
=======================

Adobe Scene7 PHP SDK

41.0k2[1 PRs](https://github.com/joshuaadickerson/Scene7/pulls)PHP

Since Jun 16Pushed 3y ago3 watchersCompare

[ Source](https://github.com/joshuaadickerson/Scene7)[ Packagist](https://packagist.org/packages/joshuaadickerson/scene7)[ RSS](/packages/joshuaadickerson-scene7/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Adobe Scene7 HTTP Protocol API
==============================

[](#adobe-scene7-http-protocol-api)

A library to create request strings for the Adobe Scene7 HTTP Protocol.

Installation
------------

[](#installation)

The easiest way to install this library is with Composer `composer require joshuaadickerson/scene7`

There is no version yet since I'm not ready to call it stable.

The minimum PHP version is 5.6.

[![Build Status](https://camo.githubusercontent.com/82d9041ea5882875f157f7e980dc6545d2368e5ef05fde1c65d5b722a0c944b0/68747470733a2f2f7472617669732d63692e6f72672f6a6f73687561616469636b6572736f6e2f5363656e65372e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/joshuaadickerson/Scene7)[![Documentation Status](https://camo.githubusercontent.com/aed76250185ebbd95184d3c2abef6ed5beb806a8db55cd5274d259768486bafa/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f7363656e65372f62616467652f3f76657273696f6e3d6c6174657374)](http://scene7.readthedocs.io/en/latest/?badge=latest)

Factory
-------

[](#factory)

The factory should be used to create a new request and layers.

```
// See "Factory Defaults Callback"
$factory = new Scene7\Factory('https://www.example.com', $callback);
$image = $factory->newImage('myProductImage');
echo $image->render();

// Output:
// https://www.example.com/myProductImage?defaultImage=MyDefaultImage&id=42
```

All requests and helpers also implement \_\_toString() so you don't have to call render() directly.

### Factory Defaults Callback

[](#factory-defaults-callback)

I decided that instead of trying to implement a defaults setter using an array or an object or something else, I would use a callback. This allows you to do a lot more than with another method.

```
$callback = function (AbstractRequest $request) {
    // Apply defaults based on the request type
    switch ($request->getRequestType()) {
        case 'img':
            $request
                ->setDefaultImage('MyDefaultImage')
                ->setId(rand(0, 100));
            break;
    }
}
```

You can set the layer defaults the same as well. They will only be applied when you add a new layer.

Helpers
-------

[](#helpers)

### Picture

[](#picture)

You can quickly create a picture tag with nested `` and `` tags.

The easiest way to create a picture tag is using `Picture::addSourceListFromImage()`.

#### Example

[](#example)

```
$picture = new Scene7\Helpers\Html\Picture;
$image = new Scene7\Requests\Image('https://example.com/', 'myProduct');
$queries = [
    // The key is the media query
    // The value is an array of k/v pairs where the key is the HTML attribute you want to set
    '(min-width: 1000px)' => [
        // Width and height get multiplied based on $multipliers (see below)
        'width' => 500,
        'height' => 500,
    ],
    '(min-width: 500px)' => [
        'width' => 250,
        'height' => 250,
    ],
];
$picture->addSourceListFromImage($queries, $image, [2, 1])->setImage($image);

echo $picture->render();

// Output:
//
```

Contributing
------------

[](#contributing)

This *is* maintained. I don't want to give the impression that it's not. I plan on doing some things with this and I use it at work. One of the big reasons for open sourcing it though, is so I don't have to do *all* of the work.

Feel free to submit pull requests. Please add tests with your PR so I can merge it faster.

If you have a feature request or issue, I consider that a contribution and welcome them.

### TODO

[](#todo)

- implement all of the request types
- test everything
- figure out the "src" command documentation
- implement mask
- more helpers like audio and video
- documentation
- examples
- fix obscured queries
- add Travis CI config
- add some cool things to this readme to show if it's successfully building and the test coverage

License
-------

[](#license)

This work is licensed under the BSD-3 clause license

### Association with Adobe

[](#association-with-adobe)

Adobe and Scene7 are trademarks of Adobe Systems Incorporated. This package has no association with them. I would love if Adobe stepped up and took over maintenance of this and distrubted it as official, but that is not the case as of now. This is *not* an official package.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

---

Top Contributors

[![colindean](https://avatars.githubusercontent.com/u/197224?v=4)](https://github.com/colindean "colindean (1 commits)")[![joshuaadickerson](https://avatars.githubusercontent.com/u/195087?v=4)](https://github.com/joshuaadickerson "joshuaadickerson (1 commits)")

---

Tags

adobeimage-manipulationimage-processingimages

### Embed Badge

![Health badge](/badges/joshuaadickerson-scene7/health.svg)

```
[![Health](https://phpackages.com/badges/joshuaadickerson-scene7/health.svg)](https://phpackages.com/packages/joshuaadickerson-scene7)
```

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k22](/packages/bkwld-croppa)[marc1706/fast-image-size

fast-image-size is a PHP library that does almost everything PHP's getimagesize() does but without the large overhead of downloading the complete file.

959.4M20](/packages/marc1706-fast-image-size)[char0n/ffmpeg-php

PHP wrapper for FFmpeg application

495225.1k1](/packages/char0n-ffmpeg-php)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
