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

Closed
waybackarchiver opened this issue Jul 12, 2020 · 1 comment · Fixed by #10
Closed

Can not resolve the lazy load image #2

waybackarchiver opened this issue Jul 12, 2020 · 1 comment · Fixed by #10

Comments

@waybackarchiver
Copy link
Collaborator

Source: https://mp.weixin.qq.com/s/Xo78wOeoR6RArdcuREdHUQ

The lazy image block:

<img class="rich_pages" data-ratio="1.23875" data-s="300,640" data-src="https://mmbiz.qpic.cn/mmbiz_jpg/qfC4kOufBopzvshib8KowN41pKLiahBe0EmAd8vrevPlIIhDLv16b7F3AbUJBCTLo9Tt7zlx6AyvNoEpNiaZcpJ0g/640?wx_fmt=jpeg" data-type="jpeg" data-w="800" style="">

I suggest removing the dot before image format in the regex.

obelisk/process-html.go

Lines 17 to 19 in e22fddd

rxLazyImageSrc = regexp.MustCompile(`(?i)^\s*\S+\.(jpg|jpeg|png|webp)\S*\s*$`)
rxLazyImageSrcset = regexp.MustCompile(`(?i)\.(jpg|jpeg|png|webp)\s+\d`)
rxImgExtensions = regexp.MustCompile(`(?i)\.(jpg|jpeg|png|webp)`)

@waybackarchiver waybackarchiver changed the title Can not resolv lazy image Can not resolve the lazy load image Jul 12, 2020
@waybackarchiver
Copy link
Collaborator Author

This issue should be resolved at 765a5cd

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 a pull request may close this issue.

1 participant