Skip to content

Commit

Permalink
adding documentation about upgrading intervention/image to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
frasmage committed Apr 9, 2024
1 parent 5dacf0a commit 7633838
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 6.0.2
- Added `intervention/image-laravel` package to the composer suggests list
- Updated documentation with configuration instructions for intervention/image

## 6.0.1

- Fix readthedocs documentation build configuration
Expand Down
1 change: 1 addition & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Minimum PHP version moved to 8.1
* Minimum Laravel version moved to 10
* (optional) If upgrading the `intervention/image` package to 3.X, be sure to review the [upgrading instructions](https://image.intervention.io/v3/introduction/upgrade) for that package. Notably, the Laravel service providers for configuring the package have been moved to a separate repository [intervention/image-laravel](https://github.com/Intervention/image-laravel)
* New database migration file is included with the package. Run `php artisan migrate` to apply the changes.
* Add the `MediableInterface` to all models using the `Mediable` trait.
* To add support for data URLs to the MediaUploader, the following entry should be added to the `source_adapters.pattern` field in `config/mediable.php`
Expand Down
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
"migrations/"
]
},
"suggest": {
"intervention/image-laravel": "Laravel bindings for the intervention/image package used for image manipulation"
},
"minimum-stability": "stable",
"prefer-stable": true,
"extra": {
Expand Down
25 changes: 24 additions & 1 deletion docs/source/variants.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,30 @@ Laravel-Mediable integrates the `intervention/image <http://image.intervention.i
Configure Intervention/image ImageManager
-----------------------------------------

By default, intervention/image will use the `GD <https://www.php.net/manual/en/book.image.php>`_ library driver. If you intend to use the additional features of the `ImageMagick <https://www.php.net/manual/en/book.imagick.php>`_ driver, you should make sure that the PHP extension is installed and the correct configuration is bound to the Laravel service container.
Before you can use the ImageManipulation features of this package, you will need to make sure that the intervention/image package is properly configured. Intervention/image is capable of using either the `GD <https://www.php.net/manual/en/book.image.php>`_ or `ImageMagick <https://www.php.net/manual/en/book.imagick.php>`_ libraries as the underlying driver.

Intervention/image >=3.0
^^^^^^^^^^^^^^^^^^^^^^^

RECOMMENDED: install the `intervention/image-laravel <https://image.intervention.io/v3/introduction/frameworks#laravel>`_ package to configure the container bindings automatically.

Alternatively, you can add the necessary bindings to the service container by adding the following to one of the service providers of your application.

::

<?php
// if using GD
$app->bind(Intervention\Image\Interfaces\DriverInterface::class, \Intervention\Image\Drivers\Gd\Driver::class);

// if using Imagick
$app->bind(Intervention\Image\Interfaces\DriverInterface::class, \Intervention\Image\Drivers\Imagick\Driver::class);

Intervention/image <3.0
^^^^^^^^^^^^^^^^^^^^^^^

RECOMMENDED: `follow the steps <https://image.intervention.io/v2/introduction/installation#integration-in-laravel>`_ to enable the intervention/image Laravel service provider.

Otherwise, by default, intervention/image will use the `GD <https://www.php.net/manual/en/book.image.php>`_ library driver. If you intend to use the additional features of the `ImageMagick <https://www.php.net/manual/en/book.imagick.php>`_ driver, you should make sure that the PHP extension is installed and the correct configuration is bound to the Laravel service container.

::

Expand Down

0 comments on commit 7633838

Please sign in to comment.