You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current avatar are sent in either png or svg format, depending on existence of avatar for user.
But image loaders in android or ios doesn't support direct rendering of SVG images. Most of the times, need to write down custom code on top of image loaders to load SVG images. This created problem of inconsistency while loading images ( one avatar is assigned to another user) and caching. I think it's really easy to solve from server side by using simple trick
There are some libraries that allows quick conversion of SVG to PNG specifically for designed platform
https://www.npmjs.com/package/save-svg-as-png
You can provide end-point as /avatar/username?format="png";height="20px";width="20px"
which will return png based on required attributes. Those images are easy to parse and in absolute format, so SDK or Android developer don't have to check for SVG or PNG format returned by server.
I hope you guys consider my request 👍
The text was updated successfully, but these errors were encountered:
Hello @sacOO7 and @rafaelks! For this issue, I will to provide a new PR for only quick conversion of SVG to PNG specifically. PNG will be a absolute response format by default.
The power of supporting the mentioned parameters for custom response (such as "format", "width" and "height") was moved to a new specific issue (#8178), for a faster increment of this on our develop branch, since the "extra power" will need for more discussion about security and capacity at server side, besides a more expensive code review.
Current avatar are sent in either png or svg format, depending on existence of avatar for user.
But image loaders in android or ios doesn't support direct rendering of SVG images. Most of the times, need to write down custom code on top of image loaders to load SVG images. This created problem of inconsistency while loading images ( one avatar is assigned to another user) and caching. I think it's really easy to solve from server side by using simple trick
There are some libraries that allows quick conversion of SVG to PNG specifically for designed platform
You can provide end-point as /avatar/username?format="png";height="20px";width="20px"
which will return png based on required attributes. Those images are easy to parse and in absolute format, so SDK or Android developer don't have to check for SVG or PNG format returned by server.
I hope you guys consider my request 👍
The text was updated successfully, but these errors were encountered: