Skip to content

Suffix image sizer option causes focus change to not generate new variation #703

Open
@Toutouwai

Description

@Toutouwai

Short description of the issue

Normally every time the focus area for an image is changed in Page Edit a new variation is generated and visible on the front-end (browser cache may need to be cleared to see the changed variation).

This can be seen in these front-end screenshots before and after the focus area is changed (browser dev tools are open to disable caching).

<img src="<?= $page->image->size(200, 300)->url ?>" alt="">

2018-09-18_213741
2018-09-18_213805

But if a suffix is passed in as an image sizer option then the variation no longer updates after a focus change.

<img src="<?= $page->image->size(200, 300, ['suffix' => 'test'])->url ?>" alt="">

Expected behavior

Suffix has no impact on focus change generating new variation.

Optional: Suggestion for a possible fix

It would be great if the focus area was included (perhaps in an encoded form) as part of the variation file name so changing the focus area would reliably result in a new variation being loaded on the front-end regardless of suffix and would take care of cache-busting.

Setup/Environment

  • ProcessWire version: 3.0.113

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