Skip to content

Instantly share code, notes, and snippets.

@fpersico
Created January 5, 2018 15:15
Show Gist options
  • Save fpersico/3d79d28b9a72817c6803986abeb03e9b to your computer and use it in GitHub Desktop.
Save fpersico/3d79d28b9a72817c6803986abeb03e9b to your computer and use it in GitHub Desktop.
ImageDerivative
import React from 'react';
class ImageDerivative extends React.PureComponent {
render() {
const { image, derivative } = this.props;
const url = image.meta.derivatives[derivative];
return <img src={url} alt={image.filename} />;
}
}
export default ImageDerivative;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment