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

ios safari中,展开图片功能与 loading="lazy" 冲突 #402

Open
miniwater opened this issue Mar 30, 2024 · 1 comment
Open

ios safari中,展开图片功能与 loading="lazy" 冲突 #402

miniwater opened this issue Mar 30, 2024 · 1 comment
Labels
待确认问题 等待确认是否是已存在的问题

Comments

@miniwater
Copy link
Contributor

  • 主题版本号:2.8.1
  • WordPress版本:6.4.3
  • PHP版本:8.2.10
  • 机型:iPhone12 pro max
  • 系统: ios17.2.1
  • 问题阐述:ios safari中,文章中如果出现四张以上的图片,文章中所有图片都能正常显示,但是第四张开始就无法点开预览,发现从第四张图片开始
    loading="lazy" 字样。

<img title="Wordpress" alt="Wordpress" loading="lazy" decoding="async" width="481" height="377" src="https://www.krjojo.com/wp-content/uploads/2024/03/兄弟你好香-1.webp" class="wp-image-8507">

测试发现,在 /wp-includes/media.php 修改第5818行

$loading_attrs['loading'] = 'lazy';

把 lazy 改成其他内容,如 lazys ,ios safari浏览器能正常点开所有图片。

手上没有mac设备,没办法做更多测试

@miniwater miniwater added the 待确认问题 等待确认是否是已存在的问题 label Mar 30, 2024
@Lvshujun0918
Copy link
Contributor

这个不是主题的问题,是Safari浏览器对WordPress原生图片延迟加载的支持问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
待确认问题 等待确认是否是已存在的问题
Projects
None yet
Development

No branches or pull requests

2 participants