pimcore / docker

73 stars 49 forks source link

Disable AVIF image format because of performance issues #138

Closed brusch closed 1 year ago

brusch commented 1 year ago

I think it makes sense to just completely disable AVIF support in ImageMagick because of massive performance issues when converting to AVIF.

This can be removed for v3 as soon as Debian bookworm was released.

NiklasBr commented 1 year ago

isn't it better to use the existing Pimcore setting? How do you allow for AVIF generation without building a custom Docker image with this change?

https://github.com/pimcore/pimcore/blob/b419ee7b7f7a95d0034590fbf0d957913846a07b/bundles/CoreBundle/src/DependencyInjection/Configuration.php#L450-L459

brusch commented 1 year ago

The problem with AVIF exists just in this image, so it should be "fixed" here as well and not by changing a default setting in Pimcore imho.

NiklasBr commented 1 year ago

What is the expected workflow for those using this image and need to generate AVIF images then?

brusch commented 1 year ago

They need to build their own image anyway, because they would need to compile the latest libraries or use the bookworm repositories to get around this AVIF issue - or they just accept the poor performance 😊 In the latter case they can just mount their own ImageMagick policy: ./my-custom-policy/policy.xml:/etc/ImageMagick-7/policy.xml:ro

NiklasBr commented 1 year ago

Accepting poor performance is they way to go, we do not need to care about it because we defer all thumbnail generation to Symfony messenger on a separate cron instance, so it never matters if generating a thumbnail takes five seconds or a minute. The visitor and frontend Pimcore instance will never be impacted.

brusch commented 1 year ago

@NiklasBr dev version of Bookworm is available now: https://hub.docker.com/r/pimcore/pimcore/tags?page=1&name=-v3- It has AVIF enabled again 😉