Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Pregeneration of Thumbnail via CLI does not support Webp #5295

@andreas-gruenwald

Description

@andreas-gruenwald

Feature Request

Sometimes it is necessary to pregenerate images so that user's do not have to wait when a new version of a Webshop launches.

We are doing this by calling the CLI:

$image->getThumbnail($thumbnailFormat)->getFileSystemPath()

This command calls the generate methode and the Pimcore\Model\Asset\Image\Thumbnail\Processor if the file system path does not exist yet.

Unfortunatelly - if the thumbnail config setting is "optimized", then only a "png" will be generated, no webp which is more commonly used by modern webbrowsers. The reason is that Frontend::hasWebpSupport() is queried, which is always false in CLI scripts.

There should be a way to
1 control the format of the generated thumbnail, e.g. via listener.
2 generate all formats at once.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions