Download the PHP package jorisnoo/craft-imageboss without Composer

On this page you can find all versions of the php package jorisnoo/craft-imageboss. 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 craft-imageboss

Craft ImageBoss

ImageBoss integration for Craft CMS with native transform fallback.

Requirements

Installation

Copy the config file to config/imageboss.php:

Configuration

Set your ImageBoss credentials in .env:

When IMAGEBOSS_SOURCE is not set, the plugin falls back to Craft's native image transforms.

Config Options

Option Default Description
source null ImageBoss source identifier
token null HMAC token for URL signing
apiKey null API key for cache purging
baseUrl https://img.imageboss.me ImageBoss CDN base URL
includeVolumeFolder false Include volume folder name in URL path
defaultWidth 1000 Default width for url()
defaultInterval 200 Step size for srcset generation
presets [] Named preset configurations

Presets

The plugin supports two approaches for defining presets: config-based and interface-based.

Option 1: Config-Based Presets

Define presets in config/imageboss.php:

Option 2: Interface-Based Presets

Implement the ImagePreset interface on your enum for self-contained presets:

The HasImagePresetHelpers trait provides convenience methods:

Cache Purging

When IMAGEBOSS_API_KEY is set, the plugin listens for Craft's EVENT_AFTER_REPLACE_ASSET and queues a job that sends a DELETE request to the asset's ImageBoss URL. ImageBoss then clears all cached variants of the master image. See the ImageBoss caching docs for details.

Usage

Twig

The plugin registers an imageboss template variable and Twig filters.

Fluent API

Shorthand Methods

Filters

Full Example

With a placeholder for lazy loading:

PHP

Builder Methods

Method Description
width(int) Set image width
height(int) Set image height
ratio(float) Set aspect ratio (width/height)
min(int) Minimum width for srcset
max(int) Maximum width for srcset
interval(int) Width step for srcset
format(string) Output format override
quality(int) Output quality 1-100
animation(bool) Preserve animation for animated GIFs. By default ImageBoss only processes the first frame. Combine with format('mp4') to convert to video.
download(bool\|string) Force browser download. true keeps the original filename, a string sets a custom one.
preset(string\|BackedEnum\|ImagePreset) Apply preset configuration
url() Generate single URL
srcset() Generate srcset array
srcsetString() Generate srcset string
transform() Get TransformResult with first(), last(), all()
cdn(array $options = []) Generate passthrough URL via ImageBoss cdn operation (no transform). Falls back to the asset's native URL when no source is configured. Pass ['compression' => false] to disable ImageBoss compression.
placeholder(?string $color) Generate SVG data-URI placeholder
aspectRatio() Get resolved aspect ratio

All setter methods accept null safely and return $this for chaining.

Example Output

url() returns a single URL:

srcsetString() returns a comma-separated srcset string:

When an asset has a focal point set, it's automatically included in the URL:

Assets without a focal point default to center (fp-x:0.5,fp-y:0.5) so cover crops stay centred instead of falling back to ImageBoss's smart-crop.

Features

License

MIT


All versions of craft-imageboss with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
craftcms/cms Version ^5.0
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 jorisnoo/craft-imageboss contains the following files

Loading the files please wait ...