Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
let url = getAppropriateImageUrl({
imageId: this.props.imageId,
availableWidth: this.props.width,
imageConfig,
hiResRatio
});
url = transformUrl(url);
const elementProps = Object.keys(this.props).reduce((result, key) => {
// All prop types we don't want to pass to the element should fail this condition.
if (
!/^(imageId|width|background|backgroundPosition|backgroundSize)$/.test(
key
)
) {
result[key] = this.props[key];
}