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

Filter Images #140

Open
SridharRamasami opened this issue Jul 10, 2018 · 1 comment
Open

Filter Images #140

SridharRamasami opened this issue Jul 10, 2018 · 1 comment

Comments

@SridharRamasami
Copy link

Hi,
Resizing of png creates files that are much larger than the originals. I have worked around it, by asking the images to be converted to jpgs. However, looks like this cannot be done for gif or ico. Is there a way to use a filter for images in the configuration. ie only allow jpg, jpeg and gif.

Hack is also acceptable.
Thanks.

@spreadred
Copy link

You could change the RegEx on the following line:

if ( /^image\//.test( fileInfo.type ) || /.+\.(bmp|gif|jpg|jpeg|png)$/.test(fileInfo.name.toLowerCase()) ) {

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