Download the PHP package outerweb/filament-image-library without Composer

On this page you can find all versions of the php package outerweb/filament-image-library. 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 filament-image-library

Filament Image Library

Latest Version on Packagist Total Downloads

This package adds a way to interact with outerweb/image-library in Filament.

It adds:

Installation

You can install the package via composer:

You can publish the config file with:

You can publish the translations using:

Create or Update your custom theme

To comply with the recommended way of styling a Filament plugin, you will have to create a custom theme. You can follow the steps described here in the offical documentation.

This is done so that all tailwind classes defined in the plugin will get bundles in your custom theme. So it will fit perfectly within your theme.

After that, you may add the following to the resources/css/filament/filament/tailwind.config.js file in the content array:

You can then run npm run build to build your custom theme's assets.

Configure the underlying outerweb/image-library

Configure the outerweb/image-library package as described in the Image Library documentation.

Customize the Image Library Page

If you need to customize the image library page, you can create a new Filament page that extends the ImageLibrary class. Set your custom page in the configuration file and then make your customizations.

Configure the Navigation group

To configure the navigation group, publish the translation files, then edit the navigation_group value.

Add the plugin to your panel

Add the plugin to your desired Filament panel:

You can specify the allowed storage disks where the user may upload images:

In the example above, the user will be able to upload images to the public disk and select images from it. The UI will show the disk name as Public images. You can also add a translation for the disk name.

By default, the plugin will enable the public disk if you didn't specify any allowed disks.

You can also use the addAllowedDisk method to add a disk:

Set the navigation sort of the image library page

You can set the navigation sort of the image library page by adding the navigationSort method:

This will let you customize the index of the image library page in the navigation.

Usage

You can add the ImageLibraryPicker form field to your form:

Allowing multiple images

You can allow the user to select or upload multiple images by adding the multiple method:

Disabling the upload feature

You can disable the upload feature by adding the disableUpload method:

This will prevent the user from uploading new images via this field.

Disabling the select existing feature

You can disable the select existing feature by adding the disableExisting method:

This will prevent the user from selecting existing images via this field.

Disabling the image deselect feature

You can disable the image deselect feature by adding the disableImageDeselect method:

This will prevent the user from deselecting the image(s) via this field.

Disabling the image edit feature

You can disable the image edit feature by adding the disableImageEdit method:

This will prevent the user from editing the image(s) via this field. Editing is the feature that allows the user to set the image title and alt attributes.

Disabling the image edit badge feature

You can disable the image edit badge feature by adding the disableImageEditBadges method:

This will prevent the user from seeing the edit badge on the image(s) via this field. This badge shows the user if the image title and alt attributes are missing.

Disabling the image ordering feature

You can disable the image ordering feature by adding the disableOrderingImages method:

This will prevent the user from re-ordering the images via this field. Note: This feature is only available when the field is set to allow multiple images.

Disabling the image cropping feature

You can disable the image cropping feature by adding the disableImageCrop method:

This will prevent the user from cropping the image(s) via this field.

Configuring the items per page when selecting existing images

You can configure the items per page when selecting existing images by adding the existingItemsPerPage method:

This will set the amount of items to show in the select existing images modal. This is set to 9 by default. To fit the style of the modal, it is recommended to use a number that can be divided by 2 and 3.

Filtering the shown image conversions

You can filter the shown image conversions by adding the filteredConversionDefinitions method:

This will only show the thumbnail and 16:9 image conversions in the image picker. You can use strings or ConversionDefinition instances.

By default, all image conversions are shown, except the ones defined by this package.

Disabling one or more image conversions

You can disable one or more image conversions by adding the disabledConversionDefinitions method:

This will disable the thumbnail and 16:9 image conversions in the image picker. All other image conversions will be shown. You can use strings or ConversionDefinition instances.

You may always combine the filteredConversionDefinitions and disabledConversionDefinitions methods.

Enabling the package conversions

You can enable the package conversions by adding the enablePackageConversionDefinitions method:

This will enable the package conversions in the image picker. By default, the package conversions are disabled because they do not seem relevant in your forms.

Setting the relation order column

You can set the relation order column by adding the relationOrderColumn method:

When working with multiple images, you will typically work with a belongsToMany relation. We already included code to sync the images to the pivot table. If you want to order the images, you can add a column to the pivot table to store the order..

Displaying the selected images in the Infolist

You can display the selected images in the infolist by adding the ImageLibraryEntry infolist component:

This will display the selected images in the infolist. The argument of the make method is the name of the relation in your model.

If you would like the display the image(s) of a nested relation, you can use the dot notation:

Working with translations

If you are using the spatie/laravel-translatable package, you can use our filament-translatable-fields package to make the image picker translatable. This package is a requirement of this package, so the only things you need to do are:

Laravel support

Laravel Version Package version
^11.0 ^2.1.1
^10.0 ^1.0.0, ^2.0.0

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

MIT License (MIT). Read the License File for more information.


All versions of filament-image-library with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
filament/filament Version ^3.2
filament/spatie-laravel-translatable-plugin Version ^3.2
laravel/framework Version ^10.0|^11.0
outerweb/image-library Version ^2.4
outerweb/filament-translatable-fields Version ^1.0|^2.0
spatie/laravel-package-tools Version ^1.16
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 outerweb/filament-image-library contains the following files

Loading the files please wait ....