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

Closed
Katarn opened this issue Jan 11, 2023 · 10 comments
Closed

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

Katarn opened this issue Jan 11, 2023 · 10 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"
     />

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

@github-actions github-actions bot added the Stale label Jul 20, 2024
@Monirzadeh
Copy link
Collaborator

Monirzadeh commented Jul 20, 2024

https://habrastorage.org/webt/js/gh/h2/jsghh2fhr6xz7zoolf2i2pwxl5u.jpeg

@Katarn sorry i missing this issue (maybe GitHub notification system not work prefecrt).
i test that page and i have that image you mention in final file.
the only problem i see is data-blurred="true" not remove with obelisk so image show in blur.

can you reproduce that right now?

currently i have something like this

<img src="data:image/jpeg;base64,/contentofbase64" data-src="https://habrastorage.org/webt/js/gh/h2/jsghh2fhr6xz7zoolf2i2pwxl5u.jpeg" data-blurred="true">

how do you think it should be?

@Katarn
Copy link
Author

Katarn commented Jul 22, 2024

@Monirzadeh I probably made a mistake by creating an issue in this project. The problem is visible when using Shiori.

example.zip

I saved this file using the SingleFile extension; there is no need to look at the source code of the page.

@Monirzadeh
Copy link
Collaborator

so it is not problem of obelisk shiori use warc right now and we have a draft for replace that in go-shiori/shiori#481

i will close this issue and if anybody disagree we can reopen that again.

@Katarn
Copy link
Author

Katarn commented Jul 22, 2024

I apologize for remembering the details as I go along - a lot of time has passed. The fact is that I just build shiori from the feat/obelisk branch.

@Monirzadeh
Copy link
Collaborator

don't worry , i test that with obelisk it self.
i will test that on feat/obelisk and if it exist there mentioned this issue there to fix
anyway thanks for report ❤️

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