简体   繁体   English

在list.phtml中更改大小后,Magento类别图像全部模糊

[英]Magento Category Images are all blurry after changing size within list.phtml

http://www.rattanfurnitureuk.co.uk/sept2015/rattan-corner-sets.html http://www.rattanfurnitureuk.co.uk/sept2015/rattan-corner-sets.html

I have deleted the cache on the service but the images are still rendering blurry. 我已经删除了服务上的缓存,但是图像仍然呈现模糊。

The images should be sharp and at 276 x 276px 图像应清晰且分辨率为276 x 276像素

Go to following location and open list.phtml file. 转到以下位置并打开list.phtml文件。

app\design\frontend\yourpackage\yourtheme\template\catalog\product\

and find the following line 并找到以下行

<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>

In this code check 在此代码中检查

<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135"

Try changing resize(135) and height and width also in above mentioned line. 尝试在上述行中更改resize(135)以及高度和宽度。

Update: You have following html in your site. 更新:您的网站中有以下html。

  <a class="product-image" title="Maze Rattan - Winchester Square Corner Group" href="http://www.rattanfurnitureuk.co.uk/sept2015/rattan-corner-sets/maze-rattan-winchester-square-corner-group.html">

    <img width="135" height="135" alt="Maze Rattan - Winchester Square Corner Group" src="http://www.rattanfurnitureuk.co.uk/sept2015/media/catalog/product/cache/1/small_image/135x/9df78eab33525d08d6e5fb8d27136e95/3/1/3198.jpg">

</a>

Check what is there in <img tag. 检查<img标签中有什么。

In your Magento admin navigate to: 在您的Magento管理员中,导航至:

System > Configuration > Catalog > Product Image 系统>配置>目录>产品映像

Update the Small Image Width field to 276px. 将“ 小图像宽度”字段更新为276px。 Then flush image cache and refresh full page cache. 然后刷新图像缓存并刷新全页缓存。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM