14.为主题配置图片性能
2015-12-31 14:22
344 查看
Magento2中用于前台的产品图片性能都被存储在view.xml配置文件中。本文提供所有的可用性能细节及配置方法。
1.在view.xml中配置图片性能
view.xml通常位于主题的:
例如,view.xml在Magento Blank主题中的位置是:
在view.xml中,图片性能被配置在< images module=”Magento_Catalog”>元素内:
每种被图片性能配置的类型图片是通过< image>元素的id和type属性定义的:
下面的表格描述属性的详情:
http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/themes/theme-images.html
1.在view.xml中配置图片性能
view.xml通常位于主题的:
<theme_dir>/etc/view.xml
例如,view.xml在Magento Blank主题中的位置是:
app/design/frontend/Magento/blank/etc/view.xml
在view.xml中,图片性能被配置在< images module=”Magento_Catalog”>元素内:
<images module="Magento_Catalog"> ... <images/>
每种被图片性能配置的类型图片是通过< image>元素的id和type属性定义的:
<images module="Magento_Catalog"> <image id="unique_image_id" type="image_type"> ... </image> <images/>
下面的表格描述属性的详情:
<images module="Magento_Catalog"> <image id="unique_image_id" type="image"> <width>100</width> <!-- Image width in px --> <height>100</height> <!-- Image height in px --> </image> </images>
http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/themes/theme-images.html
相关文章推荐
- html5元素拖曳的小小实践
- OpenCV使用笔记
- js页面跳转整理
- Flex 布局教程:语法篇
- Android Studio下JNI编程(引入外部或AS自行编译so文件)
- Oracle启动时提示map size mismatch; abort
- eclipse常用快捷键大全
- VMwareWorkstation10安装OS_X_Mavericks10.9.2图文详细教程
- 网易云音乐歌单的推荐算法
- Session监听(Action 、jsp过滤)
- php+jQuery+Ajax实现点赞效果的方法(附源码下载)
- 微信自定义分享功能
- 2015年中国十大公有云服务企业综述
- 2015年中国十大公有云服务企业综述
- Activity的四种launchMode
- win7 python ImportError: No module named win32api错误
- IOS学习笔记之UIToolBar
- 动态代理技术实现设计模式-代理模式
- liunx less 命令
- 创建ios界面的三步骤