Images are blurry in my magento main page

I am new to magento. I am using the "rwd" theme. Product images become blurry when listed on the home page.

With the Inspect element, I found its natural image size to be 85x85. But redone to 140x140. How can I set the image to 140x140 or any other procedure that will be taken into account in the image resolution?

+3


source to share


4 answers


Try the following:

Go to the file view.xml

you can find in code/Magento/Catalog/etc/

.

Open the file and edit line 31 from:



<var name="product_small_image_sidebar_size">85</var>

      

to:

<var name="product_small_image_sidebar_size">140</var>

      

+1


source


If you look into the template file:

app\design\frontend\rwd\default\template\catalog\product\list.phtml

you will find around line 128 (Magento 1.9.1.x) an image size parameter for the grid view:



<?php $_imgSize = 85; ?>

      

just change the value to what you want. After clearing the Magento image cache, you will find that small images will be generated at the given resolution, which will not reduce the browser size.

The .phtml files have a lot of these settings $_imgSize

related to different views, just do a text search for the string.

+1


source


I think in your case the uploaded image is smaller and magento resizes the product image to 140x140 by default. Therefore, in this case, the image tends to expand and therefore looks blurry.

One solution would be to upload a large image.

0


source


I think you should open a magento project with good text editing software such as sublime text 2 and then do your research on the whole project (ctrl + alt + F)

and find the line '140'

.

This way you can find the place where magendo determines the size to resize your image.

0


source







All Articles