Skip to content

Stop checking Pageimage file when webpOnly option is true #2016

Open
@trk

Description

@trk

When want to create only webp file, processwire still continue to check filesystem for create new variation. This process making page render to slow.

On this line: https://github.com/processwire/processwire/blob/3cc76cc886a49313b4bfb9a1a904bd88d11b7cb7/wire/core/Pageimage.php#L877

Its not checking webpOnly option and webp file exist or not ?

I added small fix : https://github.com/processwire/processwire/blob/3cc76cc886a49313b4bfb9a1a904bd88d11b7cb7/wire/core/Pageimage.php#L873

if ($options['webpOnly'] && $filenameFinalWebp) {
	$filenameFinalExists = $filenameFinalWebp;
}

This method not removing webp variations

$image->removeVariations();

Should we use filedata for store and follow Pageimage variations instant of checking filesystem ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions