为主题配置图像属性
这篇文章讲什么
店面上使用的产品图像的属性存储在view.xml 配置文件. 本主题提供有关可用属性的详细信息以及如何配置它们。
在产品页上显示的图像属性由相册小工具选项(gallery widget options部件的选项可以在主题view.xml文件中配置。更多信息,查看Gallery widget 
view.xml中配置图像属性
view.xml 在主题中的位置:
<theme_dir>/etc/view.xml
          例如, 在Magento Blank 主题中view.xml:位于 app/design/frontend/Magento/blank/etc/view.xml.
view.xml中, 图像属性被配置在 <images module="Magento_Catalog"> 元素:
<images module="Magento_Catalog">
...
<images/>
          为每个定义的图像类型配置图像属性 id 和 type 属性在 <image> 元素:
<images module="Magento_Catalog">
	<image id="unique_image_id" type="image_type">
	...
	</image>
<images/>
          
            下表详细描述了属性:
| 属性 | 类型 | 描述 | 
|---|---|---|
 id  | 
                string | 唯一标识  | 
              
 type  | 
                string |  指定的图像类型 id. 允许的值:
                  
  | 
              
重置目录图片大小
通常,在保存产品时缓存产品图像。 然而, magento catalog:images:resize 命令使您可以调整图像大小显示在您的店面。
命令的用法:
PHP <magento install dir>/bin/magento catalog:images:resize