feat(render): reusable avatar component with IPFS support for members list#25
feat(render): reusable avatar component with IPFS support for members list#25moonia wants to merge 9 commits intosamouraiworld:mainfrom
Conversation
|
would it be better if I handled avatar resizing on my side, or should we require users to upload avatar that are already resized to specific dimensions before providing the IPFS link? or any other ideas? wdyt? |
|
For the record, there has been a signal discussion and agreement to support image resizing in gnoweb directly via image embed params maybe with this syntax: So I think for now, to resize, we use a datauri svg that embeds a sized image (I know it sound dumb but it's the best way to go forward on sized image for now I think, unless you have another hack) In any case, we can't expect the profile avatar field to have a specific size or ratio, or even point to an image, it's permissionless. The ui can decide to not show the image, but we can't rely on "requesting users/client to respect a format/size/ratio". |
|
Thank you @n0izn0iz for your answer! That makes sense, so I’ll see what I can do for now. Maybe using a data URI SVG if I can't find anything else (I wanted to try this first). I'm trying to keep it simple for now, so once image resizing support is implemented in gnoweb, we can clean this up and rely on proper syntax instead :) |
|
For the moment, I'm (temporarily) resizing IPFS images using URL query parameters (Pinata Image Optimization) and it's working. |
|
Mmh
|
|
yes I thought too and it works for now since Gnoweb doesn’t block the Pinata gateway but I’ll switch to ipfs.io. |
|
Can you open an issue upstream please? |
|
Hello @moonia and @n0izn0iz . We also use the avatar from /r/demo/profile in dSocial. We opened an issue about standardizing the avatar string format. gnolang/gno#2598 . Do you think that issue is resolved by this PR (in the case of images on IPFS)? |
Hi, I’ll take a closer look at this issue, thnks! |
Summary:
This PR (related to #22) introduces a reusable avatar component that converts
ipfs://URIs into their correspondinghttps://ipfs.io/ipfs/gateway URLs.Screenshot:
TODO: