Giter Club home page Giter Club logo

Comments (3)

nono avatar nono commented on June 15, 2024

Hi,

Issue

  1. Using the convert binary force a external dependency to ImageMagick and this is a really big library.
  2. The convert command need a write/read into the filesystem and so it require an access to the filesystem.

Yes, but we would still need ImageMagick without this feature. ImageMagick is used to generate thumbnails for uploaded images from the users, and it is quite good for being able to do that with weird formats.

Do not use those endpoints

We make the choice to add an endpoint and make the call to it from webapps, even if we have a component in cozy-ui for that. The reason is that the initials are just a placeholder. Later, we will want to allow users to choose their own avatar. But it is some works to pick a file, crop it, etc. and it has not been prioritized for the moment. Having the endpoint will make things smoother when we will implement that.

Use ajstarks/svgo

Looks good to me.

@Crash-- just to be sure, you don't see any issue by using SVG for the initial avatars?

from cozy-stack.

Crash-- avatar Crash-- commented on June 15, 2024

@Crash-- just to be sure, you don't see any issue by using SVG for the initial avatars?

I just checked on cozy-sharing, the lib just take the URL the stack returns and send it to Avatar (https://github.com/cozy/cozy-libs/blob/2896910f28d12e829f46b429ab25c1b84841a674/packages/cozy-sharing/src/components/Recipient.jsx#L144-L153) and Avatar is only doing an <img src={link} (https://github.com/cozy/cozy-ui/blob/master/react/Avatar/index.jsx#L68) so I think we're good on that.

Also, it seems that we're only adding background-color on the parent element, so I think we're good too on this path.

I don't see any issue by using SVG for initial avatars! Au contraire

from cozy-stack.

Peltoche avatar Peltoche commented on June 15, 2024

Yes, but we would still need ImageMagick without this feature. ImageMagick is used to generate thumbnails for uploaded images from the users, and it is quite good for being able to do that with weird formats.

I have hope to find a go lib for that but this is an another subject for later.

We make the choice to add an endpoint and make the call to it from webapps, even if we have a component in cozy-ui for that. The reason is that the initials are just a placeholder. Later, we will want to allow users to choose their own avatar. But it is some works to pick a file, crop it, etc. and it has not been prioritized for the moment. Having the endpoint will make things smoother when we will implement that.

This will be so cool!

I have done some tests in local and it seems to work but if you want I can put this change behind a feature flag in order to allow you to test internally. I only need an example of feature flag setup. What do you think of it?

from cozy-stack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.