Skip to content

[Enhancement] Add CP Setting for SIH CloudFront Dist #8

@andrewmenich

Description

@andrewmenich

The current setup requires putting the Serverless Image Handler CloudFront Distribution URL in asset volume (I feel like perhaps I'm missing something?)This means that anything not routed through this plugin (e.g. images inserted via Redactor, PDFs, etc) would fail. It seems the escape hatch was meant to be the SIH Settings toggle field, but since the volume URL is the SIH distribution, that wouldn't work anyway.

My proposal is to have the plugin create a setting in the CP that accepts the SIH CloudFront distribution URL. This would better separate the SIH functionality from the asset volume. If the getImgUrl function is called in the template, it utilizes the URL defined in the setting rather than the volume url. This would allow assets not routed through the plugin to be fetched as normal via a regular CloudFront distribution.

Happy to submit a PR with these changes if you're open to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions