Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FigureTwicPics] Add an option to ignore GIFs #140

Open
Tracked by #170
titouanmathis opened this issue Jul 20, 2023 · 0 comments
Open
Tracked by #170

[FigureTwicPics] Add an option to ignore GIFs #140

titouanmathis opened this issue Jul 20, 2023 · 0 comments
Assignees

Comments

@titouanmathis
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants