We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any other image format stretches/deforms the image. Solution is to generate an avatar with a background-image set to cover.
The text was updated successfully, but these errors were encountered:
I am looking for this feature too. Would be nice to have
Sorry, something went wrong.
_renderAsDiv() { const { className, round, unstyled, name, value } = this.props; const { internal } = this.state; const size = parseSize(this.props.size); const alt = name || value; const imageStyle = unstyled ? null : { maxWidth: "100%", width: size.str, height: size.str, borderRadius: round === true ? "100%" : round }; return ( <div className={className + " sb-avatar__image"} width={size.str} height={size.str} style={imageStyle} alt={alt} onError={internal && internal.fetch} > <div style={{ width: "100%", height: "100%", backgroundSize: "cover", backgroundImage: `url(${this.state.src})`, backgroundPosition: "50% 50%", borderRadius: round === true ? "100%" : round }} /> </div> ); }
No branches or pull requests
Any other image format stretches/deforms the image. Solution is to generate an avatar with a background-image set to cover.
The text was updated successfully, but these errors were encountered: