Retrieving avatar for the native iOS app
Hey! I m trying to get the avatars for the native iOS app. I see that the web app gets the username's url from the server and it sets the image by using that url. I m trying to implement this in the native app but it doesn't seem to work. I am a little bit confused so if someone could clear this up for me...
When I hit the url "https://demo[dot]rocket.chat/avatar/username" what actually happens? Does the server create a file and returns it? What format? SVG, PNG, JPG???
I guess this will be needed for the android app as well? Maybe if there would be a meteor method where we could retrieve each user's avatar? Is this doable?
Sorry for my noobness and thanks in advance.... :smiley:
For legacy reasons we added a .jpg on the URL for the request... regardless of the image format, so that CDNs and reverse proxies add IMAGE to the content type. I think we should fix that, and remove the .jpg and leave it without the extention and make sure we add the correct content type ourselves.
Right now.. its like this: https://demo.rocket.chat/avatar/hubot.jpg https://demo.rocket.chat/avatar/sing.li.jpg
And for an unknown image, the server will create a SVG on the fly: https://demo.rocket.chat/avatar/QWERTYUIOP.jpg