Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEL: doc section related to enable_lazy_loading_for_images_without_borders #7928

Merged
merged 2 commits into from
Oct 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions src/guides/v2.4/frontend-dev-guide/themes/theme-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,18 +183,3 @@ public function getBreakpoints()

{:.bs-callout-info}
Variables may be used within the scope of modules than the defined one.

### Image lazy loading {#lazy_loading}

When saving products, images are resized based on different properties including the `frame` variable `product_image_white_borders` in `view.xml`.
By default, all images have frames. Magento calculates the required frame size and then it allocates the image to it.
If the image is small, the white frame will be bigger.

The variable `product_image_white_borders` can be overwritten in a custom theme. If it is not defined in a custom theme, it can also be set in `app/code/Magento/Catalog/etc/view.xml`.
Variables defined in the theme `view.xml` have a higher priority. If the same variable is in a module's and also in the theme's `view.xml`, the module variable will be overwritten by the theme variable.

If the `frame` property is enabled in the configuration file, native lazy-loading is enabled on the category product page, checkout shopping cart, and customer wish list.
If the `frame` property is disabled, image lazy-loading is also disabled, unless the variable `enable_lazy_loading_for_images_without_borders` is enabled in `view.xml`.
This is done to prevent small images from being stretched and distorted.

If you have images within frames, and you are sure your images are correctly sized, you can enable lazy-loading by setting `enable_lazy_loading_for_images_without_borders` to `1` in `view.xml`.