chipslays / imgfy-api
Official API wrapper for Imgfy.cf
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/chipslays/imgfy-api
Requires
- php: >=7.4
This package is auto-updated.
Last update: 2025-10-06 22:56:09 UTC
README
Imgfy - is a simple and beautiful service for uploading images.
Installation
$ composer require chipslays/imgfy-api
Methods
upload
Upload image to Imgfy.cf:
Imgfy::upload(string|array $images [, bool $secretly = false]) : array
Upload single image:
use Chipslays\Imgfy\Imgfy; require __DIR__ . '/vendor/autoload.php'; $response = Imgfy::upload('potato.png'); print_r($response); Array ( [0] => Array ( [filename] => potato.png [preview] => https://imgfy.cf/hs7oe [source] => https://imgfy.cf/file/b49432863e12495ddf099.png ) )
Upload multiple images:
use Chipslays\Imgfy\Imgfy; require __DIR__ . '/vendor/autoload.php'; $response = Imgfy::upload([ 'potato.png', 'chips.jpg', ]); print_r($response); Array ( [0] => Array ( [filename] => potato.png [preview] => https://imgfy.cf/hs7oe [source] => https://imgfy.cf/file/b49432863e12495ddf099.png ) [1] => Array ( [filename] => chips.png [preview] => https://imgfy.cf/hs7od [source] => https://imgfy.cf/file/b39423123e15595dfd019.png ) )
Generate super-secretly links:
use Chipslays\Imgfy\Imgfy; require __DIR__ . '/vendor/autoload.php'; $response = Imgfy::upload('potato.png', true); print_r($response); Array ( [0] => Array ( [filename] => potato.png [preview] => https://imgfy.cf/z:maewitZhZRKPD [source] => https://imgfy.cf/file/b32166863eaf495ddf079.png ) )
Short alias upload_imgfy
function.
$response = upload_imgfy('potato.png'); $response = upload_imgfy(['potato.png', 'chips.jpg']); // super-secretly link $response = upload_imgfy('potato.png', true); $response = upload_imgfy(['potato.png', 'chips.jpg'], true);