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

torna carregamento de imagens "lazy" com regex (comando sed) #30

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

arturo32
Copy link
Contributor

@arturo32 arturo32 commented Apr 22, 2023

Relacionado a issue #1:
Isto é feito utilizando o comando "sed" com regex no arquivo build.sh para adicionar a string 'loading="lazy"' nos atributos de cada elemento "img" no arquivo final HTML.

Para que o lazy loading funcione é necessário que as imagens tenham suas origens definidas por links/caminhos. Logo o atributo global :data:uri: teve que ser removido do arquivo livro.adoc.

Isto é feito utilizando o comando "sed" com regex no arquivo build.sh
para adicionar a string 'loading="lazy"' nos atributos de cada elemento
"img" no arquivo final HTML.
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.

1 participant