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

Can not resolve the lazy load image [2] #48

Open
Katarn opened this issue Jan 11, 2023 · 4 comments
Open

Can not resolve the lazy load image [2] #48

Katarn opened this issue Jan 11, 2023 · 4 comments

Comments

@Katarn
Copy link

Katarn commented Jan 11, 2023

Continuation of the bug from issue #2.

Most often, links to stubs are written in src. I think these lines are redundant:

obelisk/process-html.go

Lines 366 to 368 in 23c015a

if (src != "" || srcset != "") && !strings.Contains(strings.ToLower(nodeClass), "lazy") {
return
}

But I would not bypass all the attributes in a row, but read only the values ​​​​from data-src and data-original. For example, Yandex search engine supports it:

Images are downloaded using links from the src attribute of the img tag, as well as the data-src and data-original attributes (in this case, the presence of a link to the image in the src attribute is not necessary).

@github-actions github-actions bot added the Stale label May 13, 2023
@go-shiori go-shiori deleted a comment from github-actions bot Jun 1, 2023
@github-actions
Copy link

This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days

@Monirzadeh
Copy link
Collaborator

@Katarn can you share a webpage this problem happen.

<img src="https://ik.imagekit.io/demo/img/image1.jpeg?tr=w-400,h-300" loading="lazy" />
<img src="https://ik.imagekit.io/demo/img/image2.jpeg?tr=w-400,h-300" />
<img src="https://ik.imagekit.io/demo/img/image3.jpg?tr=w-400,h-300" />

work fine for me.

@Katarn
Copy link
Author

Katarn commented Jan 29, 2024

It’s strange, but I can’t reproduce it myself now. Looks like I made a mistake somewhere. I'm sorry.

@Katarn Katarn closed this as completed Jan 29, 2024
@Katarn Katarn reopened this Mar 16, 2024
@Katarn
Copy link
Author

Katarn commented Mar 16, 2024

Please, try it: https://habr.com/ru/companies/tuturu/articles/781224/

<img src="https://habrastorage.org/r/w780q1/webt/js/gh/h2/jsghh2fhr6xz7zoolf2i2pwxl5u.jpeg"
     data-src="https://habrastorage.org/webt/js/gh/h2/jsghh2fhr6xz7zoolf2i2pwxl5u.jpeg"
     data-blurred="true"
     />

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

No branches or pull requests

4 participants