0

Recently I have upgraded the site from Magento 2.3.3 to Magento 2.4.1 And my etc/view.xml Throws an error

app/design/frontend/etc/view.xml" is invalid: Element 'aspect_ratio': This element is not expected. Expected is ( background ).

<image id="product_page_image_large" type="image">
    <transparency>true</transparency>
    <aspect_ratio>true</aspect_ratio>
    <frame>true</frame>
    <constrain>true</constrain>
</image>
<image id="product_page_image_medium" type="image">
   <transparency>true</transparency>
    <aspect_ratio>true</aspect_ratio>
    <frame>true</frame>
     <constrain>true</constrain>
</image>
1
  • Please post the contents of your view.xml Nov 23, 2020 at 11:58

1 Answer 1

0

Hi Please follow this link

As you have not attach your code with this issue it hard to say what going wrong

Take backup and then try changing aspect_ratio to background or just remove it as it is optional and also check if aspect_ratio is set to Boolean or not

Follow this Link for more info

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.