Skip to content

Commit

Permalink
Add hint about libjpeg, libwebp, libavif, ... (#818)
Browse files Browse the repository at this point in the history
* Add hint about libjpeg, libwebp, libavif, ...

* Add alpine hint

* Update vips

* Update bundles/media/imagine-adapter.rst

Co-authored-by: Prokyonn <daniel.mathis@sector8.eu>

---------

Co-authored-by: Prokyonn <daniel.mathis@sector8.eu>
  • Loading branch information
alexander-schranz and Prokyonn authored Sep 27, 2024
1 parent c0fdc08 commit a168d7d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions bundles/media/imagine-adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ Available adapters are:
* `imagick_extension`_
* `vips_extension`_

.. note::

You may need to install additional libraries on your operating system to support various image MIME types,
such as ``libjpeg-dev, ``libpng-dev``, ``libwebp-dev``, ``libavif-dev``.

Note that some Linux distributions, like Alpine, do not include these libraries in their base images by default.

GD
--

Expand All @@ -18,6 +25,7 @@ The simplest adapter is GD and it has no external dependencies besides the PHP e
**Docker:**

To use the GD extension, you need to install it with docker-php-ext-install. However, GD requires Linux libraries to function properly. Depending on the type of file you want to generate (such as JPG, PNG, or WebP), you also need to install the corresponding libraries.

..code-block:: bash

RUN apt-get update && apt-get install -y \
Expand All @@ -28,7 +36,6 @@ To use the GD extension, you need to install it with docker-php-ext-install. How
&& docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
&& docker-php-ext-install -j$(nproc) gd \


Imagick
-------

Expand All @@ -47,8 +54,8 @@ To install it use following commands:

.. code-block:: bash
apt-get install libmagickwand-dev inkscape
pecl install imagick
apt-get install libmagickwand-dev
apt-get install php8.3-imagick
VIPS
----
Expand All @@ -71,7 +78,6 @@ To install it use following commands:
.. code-block:: bash
apt-get install libvips-dev
pecl install vips
composer require rokka/imagine-vips
.. _gd: http://php.net/manual/en/book.image.php
Expand Down

0 comments on commit a168d7d

Please sign in to comment.