Skip to content

[providers/storyblok] Storyblok focal point filter trips up splitfilters() #170

@grgcnnr

Description

@grgcnnr

Focal point doc: https://www.storyblok.com/docs/api/image-service/operations/focal-point

Splitfilters fn: https://github.com/ascorbic/unpic/blob/main/src/providers/storyblok.ts#L31

The storyblok image CDN expects a focalpoint filter to be set like this /m/500x300/filters:focal(1869x1674:1870x1675)
but splitfilters() expects colons to be reserved for seperating filters so it gets confused.

the lightest touch solution to this is to URIEncode the focal filter before splitting.

focal = encodeURIComponent(focal)

Happy to PR somethign if that's helpful

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions