Download the PHP package tekkenking/tinypeexi without Composer

On this page you can find all versions of the php package tekkenking/tinypeexi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tinypeexi

๐Ÿ–ผ๏ธ TinyPeexi โ€” Laravel Plugin for Lossless Media Service

Upload, transform, and deliver images from your Laravel app in minutes.

TinyPeexi is a Laravel package that gives you a clean, fluent PHP API to interact with a self-hosted aipeexi / Lossless Media Service instance. Upload images, generate optimized variants, apply effects, create e-commerce product shots, and get CDN-ready delivery URLs โ€” all without leaving your Laravel codebase.


๐Ÿ“ฆ Installation

1. Require via Composer

2. Publish the Config File

This creates config/tinypeexi.php in your Laravel project.

3. Add Your Credentials to .env

That's it. You're ready to use TinyPeexi.


๐Ÿš€ Quick Start


๐Ÿ“– Full API Reference

Uploading Assets

Upload from a Form Request

Upload from a File Path

The upload() method returns an AssetDto with the asset's sha (SHA-256 hash), which you'll use as the identifier for all future operations on this image.

Uploading Multiple Files at Once

TinyPeexi supports uploading multiple files in a single HTTP request (the backend defaults to a max of 10 files per request).

The uploadMany() method returns an array of AssetDto objects.


๐ŸŽจ Blade & View Helpers

TinyPeexi includes a global helper function tinypeexi() to natively integrate into your views. Furthermore, the Variant builder automatically converts directly into a URL string when echoed, keeping your Blade templates incredibly clean.

1. The Fluent Way (Cleanest)

You don't need to call ->url(). Just echo the builder directly!

2. The Array Shorthand (Shortest)

Pass parameters dynamically if you prefer:

3. Using Config Presets

Instantly apply predefined transformations from your tinypeexi.php config:


Bulk Asset Migration

TinyPeexi includes a powerful Artisan command to migrate your existing local files into the Lossless Media Service. It is memory-safe, supports batching, queue-based variant generation, and uses a CSV file (storage/app/tinypeexi_migration_results.csv) for idempotency, meaning if the process dies, you can run the exact same command again and it will pick up right where it left off!


Deleting Assets

Returns true on success, throws TinyPeexiException on failure.


Generating Variants

The heart of TinyPeexi is the fluent Variant Builder. You start with TinyPeexi::variant($sha) and chain methods to describe the transformation you want.

Basic Resize

Resize with Exact Dimensions

Available Fit Modes

Mode Behavior
cover Crop to fill exact dimensions
contain Fit within dimensions, letterbox if needed
fill Stretch to exact dimensions (may distort)
inside Fit inside, never upscale (default)
outside Fit outside, may upscale to cover

Retina / HiDPI Support


Cropping

Smart Crop

Available Crop Positions

Position Description
center Center of image (default)
top Top edge
bottom Bottom edge
left Left edge
right Right edge
topleft Top-left corner
topright Top-right corner
bottomleft Bottom-left corner
bottomright Bottom-right corner
face AI face detection (Pro tier)
entropy Smart crop using entropy analysis
attention Smart crop using saliency/attention

Manual Crop Rectangle

Auto-Trim Whitespace


Orientation

Rotate Values Flip Values
0, 90, 180, 270, -90 h (horizontal), v (vertical), both

Effects

Grayscale


E-Commerce Product Images

This is where TinyPeexi really shines. Creating uniform, professional product images is a single method call.

Using the Fluent Builder

Using the Shorthand Helper

If you use the same e-commerce settings repeatedly, use the shorthand:

Custom E-Commerce Settings

With AI Background Removal


Watermarks

Image Watermark

Available Watermark Positions

Position Description
center Center of image
topleft Top-left corner
topright Top-right corner
bottomleft Bottom-left corner
bottomright Bottom-right corner (default)
tile Tile across entire image

Using Presets

Define reusable transformation presets in config/tinypeexi.php:

Then use them in your code:

You can define as many presets as you need (e.g., hero_banner, avatar, og_image, etc.).


Batch Variant Generation

Generate multiple sizes at once:


Output Formats

Format Extension Notes
jpeg .jpg Best for photos
png .png Lossless, supports transparency
webp .webp Modern, smaller files (default)
avif .avif Newest, smallest files
gif .gif Animated images
tiff .tiff Print-quality
ico .ico Favicons
svg .svg Vector graphics

โš™๏ธ Configuration Reference

After publishing, edit config/tinypeexi.php:

Environment Variables

Variable Default Description
TINYPEEXI_API_URL http://localhost:8080 Base URL of aipeexi instance
TINYPEEXI_DELIVERY_URL Same as API URL CDN/delivery URL
TINYPEEXI_TENANT_SLUG dev Your tenant slug
TINYPEEXI_API_KEY (empty) Your API key
TINYPEEXI_TIMEOUT 10 HTTP timeout (seconds)
TINYPEEXI_RETRIES 3 Retry count for failed requests
TINYPEEXI_RETRY_DELAY 500 Delay between retries (ms)
TINYPEEXI_MAX_UPLOAD_SIZE 26214400 Max upload size (bytes)
TINYPEEXI_STRIP_METADATA true Strip EXIF on upload
TINYPEEXI_AUTO_OPTIMIZE false Auto-optimize on upload

๐Ÿง‘โ€๐Ÿ’ป Real-World Examples

Profile Avatar Upload

Product Image Upload (E-Commerce)

Responsive Image Set

Blog Post with Watermarked Images


๐Ÿ”ง Error Handling

All errors throw TinyPeexiException:


๐Ÿงช Testing

When writing tests, you can mock the TinyPeexi facade:


๐Ÿ“‹ Method Cheat Sheet

Method Description
TinyPeexi::upload($file) Upload an image, returns AssetDto
TinyPeexi::uploadMany(array $files) Upload multiple images, returns AssetDto[]
TinyPeexi::delete($sha) Delete an asset
TinyPeexi::variant($sha) Start building a variant
->resize($w, $h?) Set target dimensions
->fit($mode) Set fit mode
->dpr($ratio) Set device pixel ratio
->format($fmt) Set output format
->quality($q) Set compression quality
->progressive() Enable progressive JPEG
->stripMetadata() Strip EXIF metadata
->crop($position) Set crop anchor
->cropRect($x,$y,$w,$h) Manual crop rectangle
->trim($threshold?) Auto-trim whitespace
->rotate($degrees) Rotate image
->flip($direction) Flip image
->autoOrient() Auto-fix EXIF orientation
->blur($sigma) Apply Gaussian blur
->sharpen($amount) Apply sharpening
->brightness($value) Adjust brightness
->contrast($value) Adjust contrast
->saturation($value) Adjust saturation
->grayscale() Convert to grayscale
->canvas($size) Set square canvas size
->pad($px) Set canvas padding
->background($color) Set background color
->removeBg() AI background removal
->ecommerce() Flag as e-commerce operation
->ecommerceVariant(...) Shorthand for e-commerce variant
->watermark(...) Add image watermark
->preset($name) Apply a config preset
->batch($sizes, $fmt?) Generate multiple sizes
->generate() Execute and return VariantDto
->toArray() Debug: get params as array

๐Ÿ“„ License

MIT License. See LICENSE for details.


๐Ÿค Contributing

Pull requests are welcome! Please open an issue first to discuss what you'd like to change.


Built with โค๏ธ for Laravel developers by tekkenking.


All versions of tinypeexi with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0
illuminate/http Version ^10.0|^11.0
guzzlehttp/guzzle Version ^7.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tekkenking/tinypeexi contains the following files

Loading the files please wait ...