woocommerce/plugins/woocommerce-admin/client/components/product-image/README.md

898 B

ProductImage

Use ProductImage to display a product's featured image. If no image can be found, a placeholder matching the front-end image placeholder will be displayed.

How to use:

import ProductImage from 'components/product-image';

render: function() {
  return (
	<div>
		<ProductImage product={ null } />
		<ProductImage product={ { images: [] } } />
		<ProductImage product={ { images: [
			{
				src: 'https://i.cloudup.com/pt4DjwRB84-3000x3000.png',
			},
		] } } />
	</div>
  );
}

Props