Download the PHP package ayvazyan10/nova-imagic without Composer

On this page you can find all versions of the php package ayvazyan10/nova-imagic. 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 nova-imagic

Imagic for Laravel Nova 4

Imagic for Laravel Nova 4

Imagic is a Laravel Nova field package that allows for image manipulation capabilities, such as cropping, resizing, quality adjustment, and WebP conversion. It utilizes the powerful Intervention Image class for image manipulation. The purpose of this package is to optimize images for web usage by converting them to the WebP format, which provides superior compression and faster load times.

Advanced Image Manipulation Made Easy with Images Magic

✅ Single/Multiple Uploads
✅ Cropping
✅ Resizing
✅ Fitting
✅ Quality Control
✅ WebP Conversion
✅ Watermarking
✅ Custom Directories

Buy me a coffee

WEDO

Requirements

🚀 Installation

Install the package via Composer.

`

📚 Usage

Here is an example of how to use Imagic in your Laravel Nova application: In your Laravel Nova resources, use the Imagic field: `

⚡ All Methods

`

📖 Examples

Below are some examples in different scenarios.

- Multiple Images

To enable multiple image uploads, use the multiple() method. Note that when you use the multiple() method, your database column should be of type text, longtext, or json to store all images in a JSON format. Additionally, you will have the ability to sort uploaded images by drag and drop.

- Cropping

To crop images, use the crop() method:

- Resizing

To resize images, use the resize() method:

- Widen resizing by width

Specify the desired (only - width) for image resizing.

- Quality

To adjust the image quality, use the quality() method: default is 90

- WebP Conversion

To convert images to WebP format, use the convert() method:
By default, the images will be converted to WebP format. To disable conversion, pass false to the convert() method:

- Fit

You can use the fit() method when defining the Imagic field in your Nova resource:

- Field with watermark

Replace the /path/to/watermark.png with the actual path to your watermark image.
This will add the watermark to the image with the specified path, position, and offset (15x15 pixels from the bottom-right corner in this example). Remember to import the Imagic class at the top of your Nova resource file:

- Specified disk

Here is an example of how to use it:

Caution: The disk is not working with custom directories and will throw an error.

- Directory Customization

BY DEFAULT - Imagic uses this structure: /storage/imagic/year/month/day/image_name.webp

The Imagic class includes a directory() method that allows you to specify a custom directory path for your image uploads. This allows for more flexibility in managing the location of your image files.

To use this feature, call the directory() method when creating an Imagic field and provide it with your custom directory path as an argument. This path should be a string, and should not start or end with a /.

Here is an example of how to use it:

In this example, any images uploaded through this field will be saved in your/custom/directory.

Caution: The provided directory path should not start or end with a /. If it does, an InvalidArgumentException will be thrown. Make sure your directory path is correctly formatted when using this feature.

For example, the following code would throw an exception:

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Author

License

MIT. Please see the license file for more information.


All versions of nova-imagic with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1|^8.0
intervention/image Version ^2.7
laravel/nova Version ^4.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 ayvazyan10/nova-imagic contains the following files

Loading the files please wait ....