Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add support for AVIF files in GIFBuilder #1050

Open
TYPO3IncTeam opened this issue Sep 16, 2024 · 0 comments
Open

[FEATURE] Add support for AVIF files in GIFBuilder #1050

TYPO3IncTeam opened this issue Sep 16, 2024 · 0 comments

Comments

@TYPO3IncTeam
Copy link
Collaborator

ℹ️ View this commit on Github
👥 Authored by Benni Mack [email protected]
✔️ Merged by Stefan Bürk [email protected]

Commit message

[FEATURE] Add support for AVIF files in GIFBuilder

The Image AVIF format is supported by "libgd" since
PHP 8.1 which can now be used to create images by
GIFBUILDER.

See https://en.wikipedia.org/wiki/AVIF

Example:
page.10 = IMAGE
page.10 {
file = GIFBUILDER
file {
backColor = yellow
XY = 1024,199
format = avif
speed = 8
quality = 44

    10 = IMAGE
    10.offset = 10,10
    10.file = 1:/my-image.jpg
  }
}

Resolves: #102353
Releases: main
Change-Id: Ibb0697f1c7120ba596ac94f31e51d4863c3999b3
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81712
Tested-by: core-ci [email protected]
Tested-by: Garvin Hicking [email protected]
Tested-by: Stefan Bürk [email protected]
Reviewed-by: Stefan Bürk [email protected]
Reviewed-by: Garvin Hicking [email protected]

➕ Added files

13.3/Feature-102353-AVIFSupportForImagesGeneratedByGIFBUILDER.rst
.. include:: /Includes.rst.txt

.. _feature-102353-1699523309:

==================================================================
Feature: #102353 - AVIF support for images generated by GIFBUILDER
==================================================================

See :issue:`102353`

Description
===========

GIFBUILDER, the image manipulation library for TypoScript based on GDlib, a PHP
extension bundled into PHP, now also supports generating resulting files of
type "avif".

AVIF is an image format, that is supported by most modern browsers, and usually
has a better compression (= smaller file size) than jpg files.

..  important::

    Before using this feature, please check whether the used operating system
    actually supports de/encoding AVIF files. Especially Debian 11 (Bullseye)
    and older or systems forked from that may lack AVIF support.

Impact
======

If defined via format=avif within a GifBuilder setup, the generated files are
now AVIF files instead of png (the default).

It is possible to define the quality of a AVIF image similar to jpg images
globally via :php:`$TYPO3_CONF_VARS['GFX']['avif_quality']` or via TypoScript's
"quality" property on a per-image basis. Via TypoScript it is also possible
to use the new property "speed" - see https://www.php.net/manual/en/function.imageavif.php
for more details.

Example
-------

.. code-block:: typoscript

    page.10 = IMAGE
    page.10 {
      file = GIFBUILDER
      file {
        backColor = yellow
        XY = 1024,199
        format = avif
        quality = 44
        speed = 1

        10 = IMAGE
        10.offset = 10,10
        10.file = 1:/my-image.jpg
      }
    }

A new test in the Environment module / Install Tool can be used to check if the
bundled GDlib extension of your PHP version supports the AVIF image format.

.. index:: Frontend, TypoScript, ext:frontend

➗ Modified files

13.0/Feature-102177-WebPSupportForImagesGeneratedByGIFBUILDER.rst
@@ -15,7 +15,7 @@ GIFBUILDER, the image manipulation library for TypoScript based on GDlib, a PHP
 extension bundled into PHP, now also supports generating resulting files of
 type "webp".
 
-WebP is an image format, that is supported by all moderns browsers, and usually
+WebP is an image format, that is supported by all modern browsers, and usually
 has a better compression (= smaller file size) than jpg files.
 
 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant