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

feat(imgs): removing lazy loading from eager images in the first fold #654

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

joaocore
Copy link

What does this PR do? *

O objetivo é evitar que este app adicione lazy loading nas imagens da primeira dobra.
Por exemplo: uma loja possui uma imagem acima do header.
Por mais que no site editor esteja com a opção "Ao carregar a página", ou seja, loading="eager", este app substitui para loading="lazy" e adiciona as classes "vtex-render-runtime-8-x-lazyload lazyloaded", causando atraso no carregamento e na renderização.
"Qualquer item acima da dobra não deve ser carregado lentamente. Esses recursos precisam ser considerados críticos e, portanto, precisam ser carregados normalmente." - Práticas recomendadas de carregamento lento

How to test it? *

Abra uma loja que tenha uma imagem pré-header.
Inspecione a imagem.
Ela vai estar com o atributo loading="lazy" e a classe "vtex-render-runtime-8-x-lazyload lazyloaded"

Copy link
Contributor

vtex-io-ci-cd bot commented Apr 11, 2024

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@joaocore
Copy link
Author

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)
  • [x ] Minor (backwards-compatible functionality)
  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants