Project

General

Profile

Actions

Bug #96925

closed

Make webp quality settings adjustable in TYPO3

Added by Christian Höfer about 2 years ago. Updated 4 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Image Generation / GIFBUILDER
Target version:
-
Start date:
2022-02-16
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

Description

Hi,

I was trying to introduce webp images to a TYPO3 V10 website.

But the results are not as good as expected. I guess this is mainly related to a high quality setting for webp, so it can't compete with JPEGs set to quality 75, which is a common value.

So it would be great to add a setting like:

$GLOBALS[‘TYPO3_CONF_VARS’][‘GFX’][‘webp_quality’]

similar to the JPEG quality setting.

Another solution would be to apply the quality setting to WEBP as well.

Cheers

Christian


Files

allowWebpConfiguration.diff (837 Bytes) allowWebpConfiguration.diff Franz Kugelmann, 2022-05-10 16:03

Related issues 2 (1 open1 closed)

Related to TYPO3 Core - Task #100010: [BUGFIX] forward jpg quality to webp commandUnder Review2023-02-21

Actions
Related to TYPO3 Core - Feature #88537: WebP image format supportClosed2019-06-11

Actions
Actions #1

Updated by Franz Kugelmann almost 2 years ago

We would also love to have some configuration options for webp rendering.
As a quick hack and to play around with settings you might want to try our current patch, see attachment

Tested in 10.4.27

Actions #2

Updated by Reiner Kempkes about 1 year ago

  • Tracker changed from Feature to Bug
  • Category changed from Content Rendering to Image Generation / GIFBUILDER
  • PHP Version set to 8.1
  • Complexity set to no-brainer
  • TYPO3 Version set to 11
  • Is Regression set to No

It should be good enough to forward the jpg quality to webp, i just proposed this as commit:
https://review.typo3.org/c/Packages/TYPO3.CMS/+/77923

I tested this using TYPO3 11.5.24 with graphicsmagick 1.3.38.
My recommendation is to merge this change back to TYPO3 v10 as well.

As it should be possible to forward the quality to webp, in my opinion this is not a feature but a bug, as it is otherwise not possible to render good quality images.

Actions #3

Updated by Sybille Peters about 1 year ago

  • Related to Task #100010: [BUGFIX] forward jpg quality to webp command added
Actions #4

Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77923

Actions #5

Updated by Sybille Peters about 1 year ago

  • Status changed from Under Review to New

For your information: A patch was created, but it was automatically created via PR on GitHub, so a new issue was created with it. I set the other issue #100010 as related and updated the commit message of the patch. so the patch will reference this issue as well.

Patch: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77923

About the patch:

  • really not sure about the "bug" thing vs. feature. I understand your reasoning, though.
  • v10 is in "Priority bugfixes mode" at this point, so only "important" bug fixes will be backported, see "Support Times": https://typo3.org/cms/roadmap
  • If you want it to be backported to v11 and v10, you have to change the Releases line this way:
Releases: main, 11.5, 10.4
  • Your best bet is to state your case in the coredev Slack channel (which you can also find in the contribution guide) or get someone to do this for you
  • you can edit the commit message via the browser on Gerrit once you got yourself a login
  • the commit message is a bit "thin" currently. More context would be helpful. Not everyone reviewing will look at the issue.
  • if that is changed to "FEATURE", it also requires a changelog

see core contribution guide

If you don't want to wait for the patch to be merged and a new release, you can apply patches to the TYPO3 core yourself. A convenient way is using Composer patches, which is also documented in the official documentation: https://docs.typo3.org/m/typo3/guide-installation/main/en-us/ApplyingCorePatches/Index.html

Actions #6

Updated by Sybille Peters about 1 year ago

Correction: v10 is in "Priority bugfixes mode" (until 30 April 2023), not v11 (though it soon will be). I updated the comment.

Actions #7

Updated by Reiner Kempkes about 1 year ago

I improved the commit message as requested.
Where to state the case in slack?
Is there a specific channel?

My point of view is, that this is a minimal invasive implementation and therefore a bugfix, because webp support has been announced in TYPO3 v10 as a feature.

For future releases (e.g. v12 etc) there should be an own config setting to influence the image generation specific for webp.
Keep in mind that webp also supports lossless compression which currently cannot be configured.
I use webp in combination with jpg, so i always render both image types.
For most of my images the default quality of webp is enough, but there are some cases (like gradients, shadows, text rendered in an image) that produces a lot of artefacts. Therefore influencing the webp quality is necessary.

Actions #8

Updated by Sybille Peters about 1 year ago

@Reiner Kempkes

Sorry about late reply. The bug vs. feature and whether the jpg option should be used is already being discussed in the review: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77923
You might want to add your arguments there (if not done already). That is actually the best place for it.

If there are further clarifications necessary, it is possible to ask questions in the TYPO3 Slack channel:

#typo3-cms-coredev

https://docs.typo3.org/m/typo3/guide-contributionworkflow/main/en-us/Account/Slack.html

Actions #9

Updated by Sybille Peters 5 months ago

Actions #10

Updated by Gerrit Code Review 4 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82196

Actions #11

Updated by Gerrit Code Review 4 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82196

Actions #12

Updated by Benni Mack 4 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF