#72872Change default rendering for pdf thumbnails to png
Description
Now if you have [GFX][thumbnails_png] = 0, the default value, pdf thumbnails are converted to gif.
If you set it to [GFX][thumbnails_png] = 1, pdf thumbnails are converted to png.
PDF used as images on FE are renderd via this chain, resulting in 256 color gifs on a page.
Add new config value for pdf2img conversion, like this:
[GFX][pdf2imgformat] = ‘jpg’
[GFX][pdf2imgformat] = ‘png’
[GFX][pdf2imgformat] = ‘gif’
default should be jpg.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 6
-
Riccardo De Contardi changed target version 02/23/17, 14:07
-
Susanne Moog changed category removed the assignee 10/27/17, 12:47
-
Susanne Moog changed target version 01/28/18, 14:28
-
taywa gmbh changed target version 08/21/18, 13:55
-
Stephan Bauer commented 03/14/21, 12:48
-
Riccardo De Contardi commented and changed status
NewClosed target version 06/25/24, 21:30Sorry, but I close this old issue as a “won’t have”.
The option
[GFX][thumbnails_png]has been removed with version 13 – see https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/Configuration/Typo3ConfVars/GFX.html#confval-globals-typo3-conf-vars-sys-gfx-thumbnails-png :> Changed in version 13.0
>
> This setting has been removed. Thumbnails from non-image files (like PDF) are always generated as PNG.If you think that this is the wrong decision or there is still work to do here please open a new issue with a reference to this one
I’m showing bigger images converted from pdf files in the frontend.
These images would be best shown as jpg not as gif or png.
Here is a comparison between the different file formats TYPO3 created.
The files are 600×425px.
GIF: 128kb
PNG: 934kb
JPG: 60kb
The png file is not optimized in any way. With an optimizer I could reduce the size to 325kb which is sill to much.
I could produce jpg file after changing $targetFileExtension to ‘jpg’ in file /sysext/core/Classes/Resource/Processing/AbstractGraphicalTask.php in line 81.
I think that the option ‘thumbnails_png’ should be deprecated and there should be an option where we can choose a file format even new formats like webp.
One problem I found after changing $targetFileExtension to ‘jpg’ is that some of these PDF files are converted to gif oder png with transparency and the jpg file shows a black frame because the color for transparency is set to this.