Question

How Can I change Product Detail Page Image Section Height. I Need To Decrease That Section Height.

enter image description here

i need to fixed this left column height as right column in magento 2 can any one help me how can i change that.

Was it helpful?

Solution

Magento uses the file called view.xml which is maintained at the theme level of the application.

So for example, if you are using the default theme luma you should find the view.xml under vendor/magento/theme-frontend-luma/etc/view.xml

In this file, you would see <images/> node inside the node.

<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/view.xsd">
    <media>
        <images module="Magento_Catalog">
            <image id="bundled_product_customization_page" type="thumbnail">
                <width>140</width>
                <height>140</height>
            </image>
            <image id="cart_cross_sell_products" type="thumbnail">
                <width>200</width>
                <height>248</height>
            </image>
            <image id="cart_page_product_thumbnail" type="small_image">
                <width>165</width>
                <height>165</height>
            </image>
            ........
        </images>
    </media>
    ......
</view>

The dimension of the images is maintained here under the <image/> node.

The id attribute value of the <image/> node is referenced in the codebase.

For example:

<image id="related_products_list" type="small_image">
    <width>152</width>
    <height>190</height>
</image>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top