Skip to content

Commit 8be1e20

Browse files
authored
[FEATURE] Add support for AVIF files in GIFBuilder (#1434)
* [FEATURE] Add support for AVIF files in GIFBuilder Resolves: TYPO3-Documentation/Changelog-To-Doc#1050 Releases: main, 13.4 * [FEATURE] Add support for AVIF files in GIFBuilder Resolves: TYPO3-Documentation/Changelog-To-Doc#1050 Releases: main, 13.4
1 parent 36d6231 commit 8be1e20

File tree

3 files changed

+54
-7
lines changed

3 files changed

+54
-7
lines changed

Documentation/Gifbuilder/Examples.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,25 @@ Examples
99
.. contents::
1010
:local:
1111

12+
.. _gifbuilder-examples-avif:
13+
14+
Using the AVIF format
15+
=====================
16+
17+
.. versionadded:: 13.3
18+
19+
AVIF is an image format, that is supported by most modern browsers, and usually
20+
has a better compression (= smaller file size) than jpg files.
21+
22+
.. important::
23+
24+
Before using this feature, please check whether the used operating system
25+
actually supports de/encoding AVIF files. Especially Debian 11 (Bullseye)
26+
and older or systems forked from that may lack AVIF support.
27+
28+
.. literalinclude:: _snippets/_avif.typoscript
29+
:caption: EXT:config/sites/my_site/setup.typoscript
30+
1231

1332
Masking semi-transparent images (Logos) onto other images
1433
=========================================================

Documentation/Gifbuilder/Properties.rst

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,9 @@ charRangeMap
153153
format
154154
======
155155

156-
.. versionchanged:: 13.0
157-
The default format is now "png". Before TYPO3 v13.0 this was "gif".
158-
159-
.. versionadded:: 13.0
160-
Support for WebP has been added.
161-
162156
.. confval:: format
163157
:name: gifbuilder-properties-format
164-
:type: "gif" / "jpg" / "jpeg" / "png" / "webp"
158+
:type: "gif" / "jpg" / "jpeg" / "png" / "webp" / "avif"
165159
:Default: png
166160

167161
File type of the output image.
@@ -170,9 +164,16 @@ format
170164

171165
* :ref:`$TYPO3_CONF_VARS['GFX']['jpg_quality'] <t3coreapi:typo3ConfVars_gfx_jpg_quality>` for a JPG image
172166
* :ref:`$TYPO3_CONF_VARS['GFX']['webp_quality'] <t3coreapi:typo3ConfVars_gfx_webp_quality>` for a WebP image
167+
* :ref:`$TYPO3_CONF_VARS['GFX']['avif_quality'] <t3coreapi:typo3ConfVars_gfx_webp_quality>` for a AVIF image
173168

174169
or via the :ref:`gifbuilder-properties-quality` property on a per-image basis.
175170

171+
.. versionchanged:: 13.0
172+
The default format is now "png". Before TYPO3 v13.0 this was "gif".
173+
174+
.. versionadded:: 13.0
175+
Support for WebP and AVIF have been added.
176+
176177

177178
.. _gifbuilder-properties-maxHeight:
178179

@@ -231,6 +232,18 @@ quality
231232

232233
.. _"lossless" compression: https://developers.google.com/speed/webp/docs/compression#lossless_webp
233234

235+
.. _gifbuilder-properties-speed:
236+
237+
speed
238+
=====
239+
240+
.. confval:: speed
241+
:name: gifbuilder-properties-speed
242+
:type: integer
243+
244+
Set the "speed" for files in format AVIF (See
245+
https://www.php.net/manual/en/function.imageavif.php for more details).
246+
234247

235248
.. _gifbuilder-properties-transparentBackground:
236249

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
page.10 = IMAGE
2+
page.10 {
3+
file = GIFBUILDER
4+
file {
5+
backColor = yellow
6+
XY = 1024,199
7+
format = avif
8+
quality = 44
9+
speed = 1
10+
11+
10 = IMAGE
12+
10.offset = 10,10
13+
10.file = 1:/my-image.jpg
14+
}
15+
}

0 commit comments

Comments
 (0)