PHPackages                             pjam/prig - 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. pjam/prig

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

pjam/prig
=========

Php Random Image Generator

v1.0.0(4y ago)15MITPHPPHP &gt;=8.0

Since Oct 19Pushed 4y ago1 watchersCompare

[ Source](https://github.com/pjam/prig)[ Packagist](https://packagist.org/packages/pjam/prig)[ RSS](/packages/pjam-prig/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

prig - Php Random Image Generator
=================================

[](#prig---php-random-image-generator)

 [![prig](https://camo.githubusercontent.com/d2033b6b66f666823d978bcc022389d8cdb930998983ab6d60c19deace224ed7/68747470733a2f2f706f6c61722d6d6f756e7461696e2d37353031302e6865726f6b756170702e636f6d2f696d6167652e7068703f77696474683d333030266865696768743d333030)](https://camo.githubusercontent.com/d2033b6b66f666823d978bcc022389d8cdb930998983ab6d60c19deace224ed7/68747470733a2f2f706f6c61722d6d6f756e7461696e2d37353031302e6865726f6b756170702e636f6d2f696d6167652e7068703f77696474683d333030266865696768743d333030)

---

This project was born just out of sheer curiosity on finding out how an image generated with randomly colored pixels, using PHP, would look like.

After the first successful try, I decided to host this somewhere to be able to use this for demo placeholder images on other projects easily by just setting an url on an image tag source attribute.

Then, since I was already using a git repository to hold my code, why not make it a downloadable package to allow usage locally without external requests?

So, to share it with everyone I released it publicly. I hope it can be of some use for anyone.

Usage
=====

[](#usage)

Using html image `src`
----------------------

[](#using-html-image-src)

You can just point the `src` attribute of an image tag to the site where it is currently hosted ()

```

```

Installing the package and creating the image on your PHP code
--------------------------------------------------------------

[](#installing-the-package-and-creating-the-image-on-your-php-code)

For now, until the package is published on packagist, you can installing it using git.

### Requirements

[](#requirements)

- PHP 8.0+ (if you need compatibility with lower versions, I can extend the code to allow it, just ask)

```
