PHPackages                             kodeops/prado - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. kodeops/prado

ActiveLibrary[HTTP &amp; Networking](/categories/http)

kodeops/prado
=============

Wrapper for Prado CDN service

04.9kPHP

Since Dec 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/kodeops/prado)[ Packagist](https://packagist.org/packages/kodeops/prado)[ RSS](/packages/kodeops-prado/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

```
 _     _  _____  ______  _______  _____   _____  _______
 |____/  |     | |     \ |______ |     | |_____] |______
 |    \_ |_____| |_____/ |______ |_____| |       ______|

```

kodeops/prado
=============

[](#kodeopsprado)

This package provides a simple to use wrapper for the prado service.

Install
-------

[](#install)

- Add composer dependency:

`composer require kodeops/prado`

- Add api token to environment file:

`PRADO_API_TOKEN=`

`PRADO_ENDPOINT=https://prado.link`

For some custom setups the `PRADO_ENDPOINT` may change. Use the default `https://prado.link` unless stated otherwise.

Properties
----------

[](#properties)

There are several handy properties that can be used for generating a mirror.

- `width` The width of the image in pixels (can be null)
- `height` The height of the image in pixels (can be null)
- `blockchain` The blockchain we are working on (currently supported: `ethereum` and `tezos`.
- `contract` The address of the smart contract (some `aliases` allowed, check Contracts alias section below)
- `mode` Resize mode (`maintain_aspect_ratio`, `fit` and `framed`)
- `author` Author of the request (for analytics purposes)

Supported marketplaces
----------------------

[](#supported-marketplaces)

With these marketplaces you can use the method `url` to avoid specifying `blockchain`, `contract` and `token_id`.

- opensea.io
- hicetnunc.xyz
- hicetnunc.art
- teia.art
- henext.xyz
- hic.af
- versum.xyz
- rarible.com
- objkt.com
- artblocks.io
- tender.art

Usage
-----

[](#usage)

Using the marketplace URL:

```

use kodeops\Prado\Prado;

$url = Prado::url('https://www.henext.xyz/o/500787')
    ->width(1200)
    ->height(1200)
    ->quality(75)
    ->author('xp.lo.it')
    ->url();

// https://pradocdn.s3.eu-central-1.amazonaws.com/tezos/KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton/500787/500787_1200x1200-maintain_aspect_ratio-90.jpeg

```

You can use the facade for quick access to NFT:

```
use kodeops\Prado\Prado;

$url = Prado::nft(500787)
    ->blockchain('tezos')
    ->contract('hicetnunc')
    ->width(1200)
    ->height(1200)
    ->quality(75)
    ->author('xp.lo.it')
    ->url();

// https://pradocdn.s3.eu-central-1.amazonaws.com/tezos/KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton/500787/500787_1200x1200-maintain_aspect_ratio-90.jpeg

```

The example above will generate the following image:

[![https://pradocdn.s3.eu-central-1.amazonaws.com/tezos/KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton/500787/500787_1200x1200-maintain_aspect_ratio-90.jpeg](https://camo.githubusercontent.com/31bef78bfda14427c06009eda2072b78360e68c90c2a538d3293a19c20b2154d/68747470733a2f2f707261646f63646e2e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f74657a6f732f4b5431524a3650626a48707763334d3572773573324e626d656677627577626478746f6e2f3530303738372f3530303738375f3132303078313230302d6d61696e7461696e5f6173706563745f726174696f2d39302e6a706567)](https://camo.githubusercontent.com/31bef78bfda14427c06009eda2072b78360e68c90c2a538d3293a19c20b2154d/68747470733a2f2f707261646f63646e2e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f74657a6f732f4b5431524a3650626a48707763334d3572773573324e626d656677627577626478746f6e2f3530303738372f3530303738375f3132303078313230302d6d61696e7461696e5f6173706563745f726174696f2d39302e6a706567)

Resizing modes
--------------

[](#resizing-modes)

There are three modes of generating an image:

### `maintain_aspect_ratio`

[](#maintain_aspect_ratio)

The default one is `maintain_aspect_ratio` and it does just that, preserves the original aspect ratio of an image. If the original image is `2500x3500` (always talking in pixels) and we set `width=1200` and `height=1200` a new image of `857x1200` will be generated. The most restrictive constraint will be used to maitain aspect ratio, in this case, the `height`.

Example:

This original image is `2500x3500`:

[![https://pradocdn.s3-eu-central-1.amazonaws.com/prado-2500x3500](https://camo.githubusercontent.com/dc41ead5a860384ed1faa3ef6ec3876b31595c84b508b9838f5e85e57a6a93f6/68747470733a2f2f707261646f63646e2e73332d65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f707261646f2d3235303078333530302d726573697a65642e6a706567)](https://camo.githubusercontent.com/dc41ead5a860384ed1faa3ef6ec3876b31595c84b508b9838f5e85e57a6a93f6/68747470733a2f2f707261646f63646e2e73332d65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f707261646f2d3235303078333530302d726573697a65642e6a706567)

After being processed it generates the following image:

[![https://pradocdn.s3-eu-central-1.amazonaws.com/prado-2500x3500-resized.jpeg](https://camo.githubusercontent.com/dc41ead5a860384ed1faa3ef6ec3876b31595c84b508b9838f5e85e57a6a93f6/68747470733a2f2f707261646f63646e2e73332d65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f707261646f2d3235303078333530302d726573697a65642e6a706567)](https://camo.githubusercontent.com/dc41ead5a860384ed1faa3ef6ec3876b31595c84b508b9838f5e85e57a6a93f6/68747470733a2f2f707261646f63646e2e73332d65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f707261646f2d3235303078333530302d726573697a65642e6a706567)

### `fit`

[](#fit)

When `fit` mode is used the image will be cropped to fit the exact proportions (portions of the image may be lost).

This example uses the previous original image and sets `width=1200` and `height=1200`, which generates the following image:

[![https://pradocdn.s3-eu-central-1.amazonaws.com/prado-2500x3500-fit.jpeg](https://camo.githubusercontent.com/a5d406b3b38fd556deb89807dce61c2333050b0e2155d9e5b2ad92cf049aca40/68747470733a2f2f707261646f63646e2e73332d65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f707261646f2d3235303078333530302d6669742e6a706567)](https://camo.githubusercontent.com/a5d406b3b38fd556deb89807dce61c2333050b0e2155d9e5b2ad92cf049aca40/68747470733a2f2f707261646f63646e2e73332d65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f707261646f2d3235303078333530302d6669742e6a706567)

### `framed`

[](#framed)

When `framed` mode is used the image will be resized in a new canvas while preserving original aspect ratio.

This example uses the previous original image and sets `width=1200` and `height=1200`, which generates the following image:

[![https://pradocdn.s3-eu-central-1.amazonaws.com/prado-2500x3500-framed.jpeg](https://camo.githubusercontent.com/64049bc209d5a3280dd0ceb34d78f077d2687d52cadb14b418048b1ce9febcb2/68747470733a2f2f707261646f63646e2e73332d65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f707261646f2d3235303078333530302d6672616d65642e6a706567)](https://camo.githubusercontent.com/64049bc209d5a3280dd0ceb34d78f077d2687d52cadb14b418048b1ce9febcb2/68747470733a2f2f707261646f63646e2e73332d65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f707261646f2d3235303078333530302d6672616d65642e6a706567)

As you can see, the image is placed with a background color `bgcolor`, which can be set usign:

`->modeProperty('bgcolor', '#e78b9a')`

which generates the following image:

[![https://pradocdn.s3-eu-central-1.amazonaws.com/prado-2500x3500-framed-bg.jpeg](https://camo.githubusercontent.com/3bec89844592b6ab054a88bd63ce74d0fa7ed863f53341464b4ad61577c1304c/68747470733a2f2f707261646f63646e2e73332d65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f707261646f2d3235303078333530302d6672616d65642d62672e6a706567)](https://camo.githubusercontent.com/3bec89844592b6ab054a88bd63ce74d0fa7ed863f53341464b4ad61577c1304c/68747470733a2f2f707261646f63646e2e73332d65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f707261646f2d3235303078333530302d6672616d65642d62672e6a706567)

If both width and height are null and mode is default, the image will be resized to maintain the aspect ratio while meeting requirements of set `width` and `height`.

Contracts alias
---------------

[](#contracts-alias)

For most common contracts in Tezos, you can use the alias available:

- hicetnunc `KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton`
- rarible `KT18pVpRXKPY2c4U2yFEGSH3ZnhB2kL8kwXS`
- versum `KT1LjmAdYQCLBjwv4S2oFkEzyHVkomAf5MrW`
- fxhash `KT1KEa8z6vWXDJrVqtMrAeDVzsvxat3kHaCE`
- knwonworigin `0xd52f40f2d422fad4a1cb9666e58f080d69f7de39`
- foundation `0x3b3ee1931dc30c1957379fac9aba94d1c48a5405`
- solana `solana`

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

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

Maintainers

![](https://www.gravatar.com/avatar/b34a1b8a32bf4ac5538d141ad0aba29c87fbb5d40df68f34305344c5c4511983?d=identicon)[kodeops](/maintainers/kodeops)

### Embed Badge

![Health badge](/badges/kodeops-prado/health.svg)

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78026.4M414](/packages/react-http)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48347.0M384](/packages/php-http-curl-client)[smi2/phpclickhouse

PHP ClickHouse Client

84310.1M71](/packages/smi2-phpclickhouse)

PHPackages © 2026

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