[Issue] Bugfix/wrong size attributes in image with border #30186
Labels
Component: Catalog
Fixed in 2.4.x
The issue has been fixed in 2.4-develop branch
Issue: Confirmed
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Issue: Format is valid
Gate 1 Passed. Automatic verification of issue format passed
Issue: Ready for Work
Gate 4. Acknowledged. Issue is added to backlog and ready for development
Priority: P3
May be fixed according to the position in the backlog.
Progress: done
Reported on 2.4.0
Indicates original Magento version for the Issue report.
Reproduced on 2.4.x
The issue has been reproduced on latest 2.4-develop branch
Severity: S3
Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
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
enable_lazy_loading_for_images_without_borders
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.
The text was updated successfully, but these errors were encountered: