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

[NEW] Get user's avatar as PNG, JPG or BMP with custom resize #8020

Closed
wants to merge 7 commits into from
Closed

[NEW] Get user's avatar as PNG, JPG or BMP with custom resize #8020

wants to merge 7 commits into from

Conversation

lindoelio
Copy link
Contributor

@lindoelio lindoelio commented Sep 2, 2017

@RocketChat/core

Closes #8178

Provides endpoint implements based on parameters for transform and resize avatars. For example: '/avatar/username?format=png&height=20&width=20' will ever return one PNG image with 20 pixels of width and 20 pixels of height. This will work either with PNG, JPG, BMP or SVG origin.

The supported formats for transformed output are: PNG, JPG and BMP.

image

image

image

@Lemmmy
Copy link

Lemmmy commented Sep 2, 2017

Seeing as this is a public endpoint, how is this cached and ratelimited? As image resizing can be a heavy operation (especially at large scales), I see potential for a DoS attack here.

@engelgabriel
Copy link
Member

@Lemmmy the best place to cache this would be at the load balancer or at CDN, but we can think about storing the resized version on the file storage.

@engelgabriel engelgabriel added this to the 0.60.0 milestone Sep 2, 2017
@rodrigok rodrigok modified the milestones: 0.60.0, 0.61.0 Dec 7, 2017
@rodrigok rodrigok modified the milestones: 0.61.0, 0.61.1 Jan 22, 2018
@rodrigok rodrigok modified the milestones: 0.61.1, Mid-term Feb 13, 2018
@sampaiodiego
Copy link
Member

Closing since the PR is not compatible with the lib we're currently using for image manipulation.

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

Successfully merging this pull request may close these issues.

User avatar as PNG, JPG or BMP with image resize
5 participants