Skip to content

[FigureTwicPics] Add an option to ignore GIFs #140

@titouanmathis

Description

@titouanmathis

Sending GIFs to TwicPics for optmization can be heavy on the bandwidth, it could be interesting to be able to filter out GIFs images from being processed by TwicPics.

Something like the following should work:

    /**
     * Get formattted original source.
     */
    get original() {
-     return this.formatSrc(super.original);
+     const { original } = super;
+     return original.endsWith('.gif') ? original : this.formatSrc(original);
    }

Maybe we could add an option to enable or disable this behaviour, or a more generic one to filter values.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions