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

Resize images before upload in web UI to reduce bandwidth #7223

Merged
merged 3 commits into from Apr 22, 2018

Conversation

Gargron
Copy link
Member

@Gargron Gargron commented Apr 21, 2018

Fix #7218

@Gargron Gargron added the ui Front-end, design label Apr 21, 2018
@ykzts ykzts added the performance Runtime performance label Apr 22, 2018
};

const resizeImage = (inputFile, callback) => {
if (inputFile.type.match(/image.*/)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Animated gifs will pass this test and it will lost animation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But a GIF image larger than 1280px... is there any point in keeping it animated, since it will be a large file size..?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but if you do so silently. they won't be aware of losing animation before posting it.

I think most cases will be covered even if we exclude GIFs from this process.

@Gargron Gargron merged commit 05fb6f0 into master Apr 22, 2018
@Gargron Gargron deleted the feature-js-resize branch April 22, 2018 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Runtime performance ui Front-end, design
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants