AD0-E720 practice question 6 of 10

An Adobe Commerce developer needs to modify the width and height of all product images inside the theme Vendor/theme. What file inside the theme is responsible for these changes?

Full set: 50 questions
Answer options
A: Vendor/theme/etc/images.xml
B: Vendor/theme/etc/view.xml Correct answer
C: Vendor/theme/etc/theme.xml
Correct Answer:
B. Vendor/theme/etc/view.xml
Explanation

The view.xml file is the primary configuration file within an Adobe Commerce theme responsible for defining the properties of product images and gallery widgets. To modify the width and height of product images, a developer must edit the nodes within this file. Each node, identified by an id and type, can have its and values specified. These configurations apply to various contexts, such as the product page, category listings, and shopping cart, ensuring consistent image sizing across the storefront.

Why Incorrect

A. Vendor/theme/etc/images.xml: This is not a standard Adobe Commerce configuration file for defining theme-level product image dimensions. Image properties are managed exclusively through view.xml.
C. Vendor/theme/etc/theme.xml: This file is used to declare a theme, specify its parent theme, and set its title. It does not contain configurations for image properties or dimensions.

References

1. Adobe Commerce Frontend Developer Guide, Configure images: "To configure image properties, you use the view.xml configuration file. This file is required for a theme." This section explicitly details how to use nodes within view.xml to set width, height, and other attributes. (Adobe Experience League, Frontend Developer Guide > Themes > Configure images).

2. Adobe Commerce Frontend Developer Guide, Theme configuration files: "A theme's view.xml file holds all media and image configurations for the storefront." This confirms view.xml as the central point for image configuration. (Adobe Experience League, Frontend Developer Guide > Themes > Technical aspects > Theme configuration files).

3. Adobe Commerce Frontend Developer Guide, Theme structure: This document outlines the purpose of key theme files. It specifies that etc/theme.xml is for theme declaration and etc/view.xml is for "Image configuration, including product image sizes, and so on." (Adobe Experience League, Frontend Developer Guide > Themes > Theme structure).

Scroll to Top