Comments (3)
Hi,
Issue
- Using the convert binary force a external dependency to ImageMagick and this is a really big library.
- 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-- 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.
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)
- nsjail Versus wasm HOT 3
- Different behaviour between `POST /sharings` and `POST /sharings/` HOT 2
- Inconsistent error title HOT 2
- CI feature: integrate pull request preview environments
- Issues some implementations issues in `lock` package HOT 5
- Moving back from https://github.com/cozy/afero to https://github.com/spf13/afero? HOT 12
- Discussion: Code coverage integration? HOT 2
- Can't run integration tests HOT 2
- can't make cozy working behind cloudflared HOT 1
- New route GET /settings/bitwarden for consistency
- Docker doesn't work HOT 2
- Can't install cozy stack HOT 2
- FAIL TO SETUP Error: badly formated URL
- Read-only file system error from cozy-stack HOT 3
- feature request: default `couchdb.url` to environment variable in default cozy config HOT 4
- Docker feature request: moving user/group creation and ownership change to Dockerfile HOT 5
- Import local fs files / Fix desynchronization HOT 2
- Using apache as reverse proxy + CORS policy HOT 3
- SafeControl Controller is not checking all Internal URLs HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cozy-stack.