Description
This issue is automatically created based on existing pull request: #30139: Bugfix/wrong size attributes in image with border
Summary (*)
Magento 2.4-develop
This PR removes most changes from commit #4e085c7
Commit #4e085c7 tried to fix images getting distorted.
By setting a boolean for the image_with_border.phtml
.
This boolean would set the width and height attribute, to the invalid html max-width and max-height attribute.
While this did fix the images not getting distorted.
This did reintroduced the use of invalid html attributes.
This commit unsets the boolean, use of invalid html attributes and fixes the images getting distorted, via the CSS instead.
Examples (*)
Proposed solution
- Remove the boolean
enable_lazy_loading_for_images_without_borders
- Remove the max-width and max-height and the if statement holding this.
- Add the value
width: auto
to the.product-image-photo
(This also possible viaobject-fit: scale-down
)
This PR also removes the redundant max-width and height from the .product-image-photo
.
Since these values are already set globally, on the image, via the reset styles.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status